First of all, the following error が came out.
ModuleNotFoundError: No module named 'tensorflow.compat.v2'
I got an error, so I tried the following.
!pip install tensorflow-gpu==2.1.0
When I tried, the error of の disappeared, but now I get the error が below.
AttributeError: module 'tensorflow' has no attribute 'ConfigProto'
Please tell me how to solve this problem.
I have no knowledge of programming.
Thank you for your cooperation.
I had a similar question.
https://stackoverflow.com/questions/56127592/attributeerror-module-tensorflow-has-no-attribute-configproto
ConfigProto appears to be obsolete in version 2.0 and later.
Try replacing tf.ConfigProto with tf.compat.v1.ConfigProto
[Additional note]
This is an example of a change.Isn't the code as follows?
import tensorflow as tf
~~~
## Error
conf=tf.ConfigProto(...)
## OK.
conf=tf.compat.v1.ConfigProto(...)
© 2024 OneMinuteCode. All rights reserved.