Try the following sentence for error reporting:
tf.compat.v1.GPUOptions(per_process_gpu_memory_fraction)