提交 3a6581eb authored 作者: Ian Goodfellow's avatar Ian Goodfellow

made another NotImplementedError more informative

上级 fc27d35b
...@@ -2061,7 +2061,9 @@ class MulSD(gof.op.Op): ...@@ -2061,7 +2061,9 @@ class MulSD(gof.op.Op):
y = tensor.cast(y, dtype) y = tensor.cast(y, dtype)
if x.type.dtype != y.type.dtype: if x.type.dtype != y.type.dtype:
raise NotImplementedError() raise NotImplementedError(
"MulSD not implemented for different input dtypes. "
"Got %s and %s." % (x.type.dtype, y.type.dtype))
# The magic number two here arises because L{scipy.sparse} # The magic number two here arises because L{scipy.sparse}
# objects must be matrices (have dimension 2) # objects must be matrices (have dimension 2)
# Broadcasting of the sparse matrix is not supported. # Broadcasting of the sparse matrix is not supported.
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论