Update avg_checkpoint.py to use compat.v1.
Update avg_checkpoint.py to use compat.v1.

PiperOrigin-RevId: 267422314

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