提交 2be53120 authored 作者: Ian Goodfellow's avatar Ian Goodfellow

translate a test to the new interface

上级 76e6de02
...@@ -1046,7 +1046,7 @@ class T_CrossentropyCategorical1Hot(utt.InferShapeTester): ...@@ -1046,7 +1046,7 @@ class T_CrossentropyCategorical1Hot(utt.InferShapeTester):
# Verify the gradient when providing output gradient # Verify the gradient when providing output gradient
h = theano.function([x, y, a], h = theano.function([x, y, a],
T.grad(expr, x, g_cost=a * x.sum()), mode=mode) T.grad(expr, x, known_grads={expr:a * x.sum()}), mode=mode)
try: try:
assert 8 <= len(h.maker.fgraph.toposort()) <= 17 assert 8 <= len(h.maker.fgraph.toposort()) <= 17
validate_grad_graph(h) validate_grad_graph(h)
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论