提交 e738777f authored 作者: Frederic's avatar Frederic

more error info.

上级 bc7062f6
...@@ -353,7 +353,7 @@ class Softmax(gof.Op): ...@@ -353,7 +353,7 @@ class Softmax(gof.Op):
x = tensor.as_tensor_variable(x) x = tensor.as_tensor_variable(x)
if x.type.ndim not in (1, 2) \ if x.type.ndim not in (1, 2) \
or x.type.dtype not in tensor.float_dtypes: or x.type.dtype not in tensor.float_dtypes:
raise ValueError('x must be 1-d or 2-d tensor of floats') raise ValueError('x must be 1-d or 2-d tensor of floats. Got ', x.type)
if x.ndim == 1: if x.ndim == 1:
x = tensor.shape_padleft(x, n_ones=1) x = tensor.shape_padleft(x, n_ones=1)
return Apply(self, [x], [x.type()]) return Apply(self, [x], [x.type()])
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论