问题 tf.GPUoptions显示未找到 解决方法 新版本的tensorflow相较于旧版本经过了大改,tf.contrib已分离为单独模块,所以如果要使用GPUoptions,需要兼容旧版本 可以使用import tensorflow._api.v2.compat.v1 as tf