提交 fc27d35b authored 作者: Ian Goodfellow's avatar Ian Goodfellow

made a NotImplementedError more informative

上级 568ca1e0
...@@ -2010,7 +2010,9 @@ class MulSS(gof.op.Op): ...@@ -2010,7 +2010,9 @@ class MulSS(gof.op.Op):
def make_node(self, x, y): def make_node(self, x, y):
x, y = as_sparse_variable(x), as_sparse_variable(y) x, y = as_sparse_variable(x), as_sparse_variable(y)
if x.type != y.type: if x.type != y.type:
raise NotImplementedError() raise NotImplementedError(
"MulSS not supported for differing types. "
"Got %s and %s." % (str(x.type), str(y.type)))
return gof.Apply(self, [x, y], [x.type()]) return gof.Apply(self, [x, y], [x.type()])
def perform(self, node, (x, y), (out, )): def perform(self, node, (x, y), (out, )):
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论