CurrentlyTensor.__bool__'s signature is as follows:
class Tensor:
def __bool__(self) -> NoReturn: ...
It suggests that the method should never be called, however the following is valid code:
import tensorflow as tf
bool(tf.constant([1]))
Since this depends on the shape of the tensor, I don't know if this can be fixed, but it would be nice to have.
Currently
Tensor.__bool__'s signature is as follows:It suggests that the method should never be called, however the following is valid code:
Since this depends on the shape of the tensor, I don't know if this can be fixed, but it would be nice to have.