profile
viewpoint

Ask questionsmodule 'tensorflow' has no attribute 'ConfigProto'

import tensorflow as tf
import os
config = tf.ConfigProto()

AttributeError: module 'tensorflow' has no attribute 'ConfigProto'
tensorflow/tensorflow

Answer questions blairhan

I guess you're using tensorflow 2.x. In that case, use tf.compat.v1.ConfigProto() instead.

useful!

Related questions

ModuleNotFoundError: No module named 'tensorflow.contrib' hot 8
Error occurred when finalizing GeneratorDataset iterator hot 7
tensorflow-gpu CUPTI errors
Error loading tensorflow
ModuleNotFoundError: No module named 'tensorflow.contrib'
TF 2.0 'Tensor' object has no attribute 'numpy' while using .numpy() although eager execution enabled by default
When importing TensorFlow, error loading Hadoop
AttributeError: module 'tensorflow.python.framework.op_def_registry' has no attribute 'register_op_list'
tf.keras.layers.Conv1DTranspose ?
[TF 2.0] tf.keras.optimizers.Adam hot 4
Lossy conversion from float32 to uint8. Range [0, 1]. Convert image to uint8 prior to saving to suppress this warning. hot 4
TF2.0 AutoGraph issue hot 4
Tf.Keras metrics issue hot 4
ModuleNotFoundError: No module named 'tensorflow.examples.tutorials' hot 4
module 'tensorflow.python._pywrap_tensorflow_internal' has no attribute 'TFE_NewContextOptions' hot 4
Github User Rank List