I stumbled upon a tensorflow error when doing a simple GAN in Keras, so a reminder of that
--Try moving the GAN sample code ――I used it as a reference Here
tensorflow.python.framework.errors_impl.FailedPreconditionError: Error while reading resource variable _AnonymousVar44 from Container: localhost. This could mean that the variable was uninitialized. Not found: Resource localhost/_AnonymousVar44/class tensorflow::Var does not exist. [[node mul_28/ReadVariableOp (defined at C:\Python\envs\virtualenv001\lib\site-packages\keras\backend\tensorflow_backend.py:3009) ]] [Op:__inference_keras_scratch_graph_2136]
Function call stack: keras_scratch_graph
It seems that the variable initialization error of tensorflow (Reference)) I wasn't sure which variable was causing the initialization error, but I found a solution here here
--optimer uses tensorflow instead of keras. (from tensorflow.keras.optimizers import Adam)
If anyone knows the cause of the error, I would appreciate it if you could comment.
Recommended Posts