提交 5ef26bb9 authored 作者: Olivier Delalleau's avatar Olivier Delalleau

Merge pull request #196 from nouiz/intdiv_test

Add test for the IntDiv element wise operation.
......@@ -772,6 +772,27 @@ SgnInplaceTester = makeBroadcastTester(op = inplace.sgn_inplace,
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 is always an integer
# (this is not a continuous output).
# 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 is always an integer
# (this is not a continuous output).
# grad=_grad_broadcast_div_mod_normal,
inplace=True
)
CeilTester = makeBroadcastTester(op=tensor.ceil,
expected=lambda a: numpy.asarray(
numpy.ceil(a),
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论