提交 91f935b2 authored 作者: Frederic Bastien's avatar Frederic Bastien

add IncSubtensor.infer_shape

上级 4841cf0a
...@@ -2568,6 +2568,9 @@ class IncSubtensor(Op): ...@@ -2568,6 +2568,9 @@ class IncSubtensor(Op):
x.__setitem__(cdata, y) x.__setitem__(cdata, y)
out[0] = x out[0] = x
def infer_shape(self, node, shapes):
return [shapes[0]]
def grad(self, inputs, (g_output,)): def grad(self, inputs, (g_output,)):
x, y = inputs[:2] x, y = inputs[:2]
idx_list = inputs[2:] idx_list = inputs[2:]
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论