Errors when save model
Opened this issue · 0 comments
Hi, I just save the model with the following line, gcn_model.model.save("./test_model")
in the main.py, however, an error occurs as below:
File "/home/uqyliu42/miniconda3/envs/tf20/lib/python3.7/site-packages/tensorflow_core/python/ops/variables.py", line 219, in _variable_v1_call
shape=shape)
File "/home/uqyliu42/miniconda3/envs/tf20/lib/python3.7/site-packages/tensorflow_core/python/ops/variables.py", line 65, in getter
return captured_getter(captured_previous, **kwargs)
File "/home/uqyliu42/miniconda3/envs/tf20/lib/python3.7/site-packages/tensorflow_core/python/eager/def_function.py", line 502, in invalid_creator_scope
"tf.function-decorated function tried to create "
ValueError: tf.function-decorated function tried to create variables on non-first call.
I searched and didn't find a solution. Do you have any idea why this error happen?