提交 0ef3ec3c authored 作者: f0k's avatar f0k

More informative warning in InferShapeTester

上级 167df2c4
...@@ -219,12 +219,12 @@ class InferShapeTester(unittest.TestCase): ...@@ -219,12 +219,12 @@ class InferShapeTester(unittest.TestCase):
shp = inp.shape shp = inp.shape
if len(set(shp)) != len(shp): if len(set(shp)) != len(shp):
_logger.warn( _logger.warn(
"While testing the shape inference, we received an" "While testing shape inference for %r, we received an"
" input with a shape that has some repeated values: %s" " input with a shape that has some repeated values: %r"
", like a square matrix. This makes it impossible to" ", like a square matrix. This makes it impossible to"
" check if the values for these dimensions have been" " check if the values for these dimensions have been"
" correctly used, or if they have been mixed up.", " correctly used, or if they have been mixed up.",
str(inp.shape)) cls, inp.shape)
break break
outputs_function = theano.function(inputs, outputs, mode=mode) outputs_function = theano.function(inputs, outputs, mode=mode)
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论