Fix deprecation warning.
Fix deprecation warning.

PiperOrigin-RevId: 276776475

tensorflow/tensor2tensor,tensorflow/tensor2tensor,tensorflow/tensor2tensor,tensorflow/tensor2tensor,tensorflow/tensor2tensor