Fix deprecation warning.
Fix deprecation warning.

PiperOrigin-RevId: 276072314

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