提交 35ea89ed authored 作者: Pascal Lamblin's avatar Pascal Lamblin

Minimalist perform() in AdvancedIncSubtensor.

上级 7fc5b57e
...@@ -3046,8 +3046,10 @@ class AdvancedIncSubtensor(Op): ...@@ -3046,8 +3046,10 @@ class AdvancedIncSubtensor(Op):
raise NotImplementedError('Advanced indexing increment of x by y with arguments (%s) not supported yet'\ raise NotImplementedError('Advanced indexing increment of x by y with arguments (%s) not supported yet'\
% ','.join(str(input) for input in inputs)) % ','.join(str(input) for input in inputs))
#def perform(self, node, inputs, (out,)): def perform(self, node, inputs, (out,)):
#raise NotImplementedError() # TODO: same thing as in AdvancedSubtensor's perform TODO
out[0] = inputs[0].copy()
out[0][inputs[2:]] += inputs[1]
#def grad? #def grad?
# grad on x is grad on output # grad on x is grad on output
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论