提交 6bbad303 authored 作者: Mohammad Pezeshki's avatar Mohammad Pezeshki

uint16 excluded

上级 d2c09a33
...@@ -44,7 +44,8 @@ UltraFastSigmoidTester = makeBroadcastTester( ...@@ -44,7 +44,8 @@ UltraFastSigmoidTester = makeBroadcastTester(
op=ultra_fast_sigmoid, op=ultra_fast_sigmoid,
expected=upcast_int8_nfunc(lambda inputs: check_floatX( expected=upcast_int8_nfunc(lambda inputs: check_floatX(
inputs, 1 / (1 + numpy.exp(-inputs)))), inputs, 1 / (1 + numpy.exp(-inputs)))),
good=_good_broadcast_unary_normal_no_complex, good=copymod(_good_broadcast_unary_normal_no_complex,
without=['uint16']), # numpy fucnting overflows with uint16.
# grad=_grad_broadcast_unary_normal, # grad=_grad_broadcast_unary_normal,
name='UltraFastSigmoidTester', name='UltraFastSigmoidTester',
# This is an approx of the sigmoid. That is why we raise eps # This is an approx of the sigmoid. That is why we raise eps
...@@ -54,7 +55,8 @@ HardSigmoidTester = makeBroadcastTester( ...@@ -54,7 +55,8 @@ HardSigmoidTester = makeBroadcastTester(
op=hard_sigmoid, op=hard_sigmoid,
expected=upcast_int8_nfunc(lambda inputs: check_floatX( expected=upcast_int8_nfunc(lambda inputs: check_floatX(
inputs, 1 / (1 + numpy.exp(-inputs)))), inputs, 1 / (1 + numpy.exp(-inputs)))),
good=_good_broadcast_unary_normal_no_complex, good=copymod(_good_broadcast_unary_normal_no_complex,
without=['uint16']), # numpy fucnting overflows with uint16.
# grad=_grad_broadcast_unary_normal, # grad=_grad_broadcast_unary_normal,
name='HardSigmoidTester', name='HardSigmoidTester',
# This is an approx of the sigmoid. That is why we raise eps # This is an approx of the sigmoid. That is why we raise eps
...@@ -65,7 +67,9 @@ SoftplusTester = makeBroadcastTester( ...@@ -65,7 +67,9 @@ SoftplusTester = makeBroadcastTester(
op=softplus, op=softplus,
expected=upcast_int8_nfunc(lambda inputs: check_floatX( expected=upcast_int8_nfunc(lambda inputs: check_floatX(
inputs, numpy.log1p(numpy.exp(inputs)))), inputs, numpy.log1p(numpy.exp(inputs)))),
good=dict(_good_broadcast_unary_normal_no_complex, good=dict(copymod(_good_broadcast_unary_normal_no_complex,
without=['uint8', 'uint16']), # numpy fucnting overflows with uint16.
uint8=[numpy.arange(0, 89, dtype='uint8')], # the range is different in new added uint8.
int8=[numpy.arange(-127, 89, dtype='int8')]), int8=[numpy.arange(-127, 89, dtype='int8')]),
# grad=_grad_broadcast_unary_normal, # grad=_grad_broadcast_unary_normal,
name='SoftplusTester', name='SoftplusTester',
......
...@@ -1128,8 +1128,8 @@ _good_broadcast_unary_normal_no_complex = dict( ...@@ -1128,8 +1128,8 @@ _good_broadcast_unary_normal_no_complex = dict(
normal=[numpy.asarray(rand_ranged(-5, 5, (2, 3)), dtype=floatX)], normal=[numpy.asarray(rand_ranged(-5, 5, (2, 3)), dtype=floatX)],
integers=[randint_ranged(-5, 5, (2, 3))], integers=[randint_ranged(-5, 5, (2, 3))],
int8=[numpy.arange(-127, 128, dtype='int8')], int8=[numpy.arange(-127, 128, dtype='int8')],
uint8=[numpy.arange(0, 255, dtype='uint8')], uint8=[numpy.arange(0, 89, dtype='uint8')],
uint16=[numpy.arange(0, 65535, dtype='uint16')], uint16=[numpy.arange(0, 89, dtype='uint16')],
corner_case=[corner_case], corner_case=[corner_case],
empty=[numpy.asarray([], dtype=config.floatX)], empty=[numpy.asarray([], dtype=config.floatX)],
) )
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论