TensorFlow 2.6中提供compat模块,用于支持兼容性问题。其中compat.v1模块用于兼容TensorFlow 1.x中的API,即可以在TensorFlow 2.6中使用1.x版本的API,即使该API在TensorFlow 2.6中已经弃用。