提交 ae6e73ab authored 作者: Pascal Lamblin's avatar Pascal Lamblin

Add other test case from the issue

上级 06f7b0bc
...@@ -1690,7 +1690,9 @@ def test_elu(): ...@@ -1690,7 +1690,9 @@ def test_elu():
def test_binary_crossentropy_reshape(): def test_binary_crossentropy_reshape():
# Reported as https://github.com/Theano/Theano/issues/4086 # Reported as https://github.com/Theano/Theano/issues/4086
a = tensor.tensor4('a') a = tensor.tensor4('a')
c = binary_crossentropy(sigmoid(a.reshape((-1, 1))), 1).sum() for c in (binary_crossentropy(sigmoid(a.reshape((-1, 1))), 1).sum(),
binary_crossentropy(sigmoid(a).reshape((-1, 1)), 1).sum()):
ga = theano.grad(c, a) ga = theano.grad(c, a)
# This only works when "specialize" options are included # This only works when "specialize" options are included
mode = theano.compile.get_default_mode().including('fast_run') mode = theano.compile.get_default_mode().including('fast_run')
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论