ConfigProto disappeared in tf 2.0, so an elegant solution is:
import tensorflow as tf
and then replace:
tf.ConfigProto
by tf.compat.v1.ConfigProto
In fact, the compatibility built in 2.0 to get tf 1.XX: tf.compat.v1
is really helpful.
Useful link:
Migrate your tensorflow 1. code to tensorflow 2.:
https://www.tensorflow.org/guide/migrate
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…