在for循环的第二步中存储参数值时出错

2024-10-03 17:25:16 发布

您现在位置:Python中文网/ 问答频道 /正文

我正在尝试实现GAN结构。 在我的代码中,我获得了第一批数据的丢失判别模型,但对于第二批数据,我得到了以下错误

ipdb> tensorflow.python.framework.errors_impl.FailedPreconditionError:  Error while reading resource variable _AnonymousVar221 from Container: localhost. This could mean that the variable was uninitialized. Not found: Resource localhost/_AnonymousVar221/class tensorflow::Var does not exist.
         [[node mul_210/ReadVariableOp (defined at C:\Python\Anaconda3\lib\site-packages\keras\backend\tensorflow_backend.py:3009) ]] [Op:__inference_keras_scratch_graph_9394]

Function call stack:
keras_scratch_graph

谢谢你的帮助


Tags: 数据代码模型backendlocalhosttensorflow错误结构