提交 f96ecd1d authored 作者: Frederic's avatar Frederic

Add test for the IntDiv element wise operation.

上级 4c3aa369
...@@ -751,6 +751,27 @@ SgnInplaceTester = makeBroadcastTester(op = inplace.sgn_inplace, ...@@ -751,6 +751,27 @@ SgnInplaceTester = makeBroadcastTester(op = inplace.sgn_inplace,
inplace = True) inplace = True)
IntDivTester = makeBroadcastTester(
op=tensor.int_div,
expected=lambda x, y: check_floatX((x, y), x // y),
good=_good_broadcast_div_mod_normal_float,
# I don't test the grad as the output are ints and
# this is a not continuous outputs
# grad=_grad_broadcast_div_mod_normal,
)
IntDivInplaceTester = makeBroadcastTester(
op=inplace.int_div_inplace,
expected=lambda x, y: check_floatX((x, y), x // y),
good=_good_broadcast_div_mod_normal_float_inplace,
# I don't test the grad as the output are ints and
# this is a not continuous outputs
# grad=_grad_broadcast_div_mod_normal,
inplace=True
)
CeilTester = makeBroadcastTester(op=tensor.ceil, CeilTester = makeBroadcastTester(op=tensor.ceil,
expected=lambda a: numpy.asarray( expected=lambda a: numpy.asarray(
numpy.ceil(a), numpy.ceil(a),
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论