Fixed tests when on_shape_error = 'raise'
It is expected that some implementations of 'infer_shape' raise a ShapeError to
indicate that they do not know how to compute the shape. In such a situation,
we should silently fall back to the default implementation, regardless of the
value of 'on_shape_error' (whose name may be misleading for developers, since
we want to catch all exceptions *except* ShapeError).
Also, when a bad shape was inferred, we should not raise a ShapeError (which
may be caught silently), but rather something that indicates that there is a
serious bug somewhere, like an AssertionError.
正在显示
请
注册
或者
登录
后发表评论