提交 9e9e9ad2 authored 作者: Razvan Pascanu's avatar Razvan Pascanu

added logic to deal with non-differentiable pathways for specify_shape R_op

上级 c64edd43
......@@ -1793,6 +1793,10 @@ class SpecifyShape(Op):
return [specify_shape(gz,s), None]
def R_op(self, inputs, eval_points):
if eval_points[0] is None:
# It means that the this op sits on top of a non-differentiable
# path
return [None]
return self.make_node(eval_points[0], *inputs[1:]).outputs
specify_shape = SpecifyShape()
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论