bool

paddle.Tensor. bool ( self: Tensor ) Tensor

Cast a Tensor to bool data type if it differs from the current dtype; otherwise, return the original Tensor. :returns: a new Tensor with bool dtype :rtype: Tensor