Thanks to visit codestin.com Credit goes to www.paddlepaddle.org.cn
Cast a Tensor to float16 data type if it differs from the current dtype; otherwise, return the original Tensor. :returns: a new Tensor with float16 dtype :rtype: Tensor