提交 7e14a84a authored 作者: Ian Goodfellow's avatar Ian Goodfellow

add validation of input to incsubtensor

上级 5c5cc7ca
...@@ -4441,6 +4441,7 @@ class IncSubtensor(Op): ...@@ -4441,6 +4441,7 @@ class IncSubtensor(Op):
def make_node(self, x, y, *inputs): def make_node(self, x, y, *inputs):
x, y = map(as_tensor_variable, [x, y]) x, y = map(as_tensor_variable, [x, y])
assert y.ndim <= x.ndim
inputs = tuple(map(Subtensor.my_as_scalar, inputs)) inputs = tuple(map(Subtensor.my_as_scalar, inputs))
idx_list = list(self.idx_list) idx_list = list(self.idx_list)
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论