用Tensorflow2跑Tensorflow1模型时出现兼容问题 error: AttributeError: module ‘tensorflow’ has no attribute ‘GPUOptions’ 解决方法: 1、将tf2版本卸载,装tf1版本 2、修改代码 #将tf.xx()修改为tf.compat.v1.xx() tf.compat.v1.GPUOptions(per_process_gpu_memory_fraction)