提交 5f2c9126 authored 作者: Arnaud Bergeron's avatar Arnaud Bergeron

Make filter_variable correct safe broadcastable differences.

上级 d27f2398
......@@ -208,6 +208,11 @@ class TensorType(Type):
if other.type == self:
return other
# Attempt safe broadcast conversion.
other = self.convert_variable(other)
if other.type == self:
return other
raise TypeError(
'Cannot convert Type %(othertype)s '
'(of Variable %(other)s) into Type %(self)s. '
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论