提交 1970fe04 authored 作者: Frederic Bastien's avatar Frederic Bastien

Make exception have only 1 error value. This change the printing to be a real string print.

上级 e35c9163
...@@ -135,9 +135,9 @@ class TensorType(Type): ...@@ -135,9 +135,9 @@ class TensorType(Type):
'this loss, you can: ' 'this loss, you can: '
'1) explicitly cast your data to %s, or ' '1) explicitly cast your data to %s, or '
'2) set "allow_input_downcast=True" when calling ' '2) set "allow_input_downcast=True" when calling '
'"function".' '"function". Value: "%s"'
% (self, data.dtype, self.dtype)) % (self, data.dtype, self.dtype, repr(data)))
raise TypeError(err_msg, data) raise TypeError(err_msg)
elif (allow_downcast is None and elif (allow_downcast is None and
type(data) is float and type(data) is float and
self.dtype == theano.config.floatX): self.dtype == theano.config.floatX):
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论