bfloat16

paddle.Tensor. bfloat16 ( self: Tensor ) Tensor

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