dtype of tensor.sum(): forbid downcasting
If the output dtype would force a downcasting of the values
(for instance, summing a float vector into an integer), a TypeError
is now raised.
Also, a Sum node has to have a non-None dtype. It is checked in
make_node because for some reason the pretty-printing mechanism needs to
instanciate "Sum()".
正在显示
请
注册
或者
登录
后发表评论