import graph with a lower producer version or update graph to newer version
Issue type
Support
Have you reproduced the bug with TensorFlow Nightly?
Yes
Source
source
TensorFlow version
2.15
Custom code
Yes
OS platform and distribution
macOS
Mobile device
No response
Python version
3.9
Bazel version
No response
GCC/compiler version
No response
CUDA/cuDNN version
No response
GPU model and memory
No response
Current behavior?
can't restore because file structure changed. the .index file starts with CB1/ML/biases.
Standalone code to reproduce the issue
restore = tf.train.import_meta_graph('./Train.meta')
restore.restore(self.sess, tf.train.latest_checkpoint('./'))
Relevant log output
2024-01-20 15:40:22.083387: W tensorflow/core/common_runtime/graph_constructor.cc:1583] Importing a graph with a lower producer version 38 into an existing graph with producer version 1645. Shape inference will have run different parts of the graph with different producer versions.
2024-01-20 15:40:35.939842: W tensorflow/core/framework/op_kernel.cc:1839] OP_REQUIRES failed at save_restore_v2_ops.cc:233 : NOT_FOUND: Key CB1/ML/bias not found in checkpoint
I am trying to get this old project running in the latest version of TensorFlow so I can start migrating it to v2. Before I replace each function I want to get it running the the v1 api
@singersbalm To use the existing graph saved with the older TensorFlow version in your current session with a newer version. However, some functionality might be limited or compatibility issues might arise.
To do this, simply use the import_graph_def function with the producer_version argument explicitly set to the older version. We recommend you to use the latest TF version by referring to the migration . If you still have any concern on TF v1, please post the issue on TF Forum. Thank you!
there is no producer_version argument in import_graph_def. the import attribute is of type GraphDef and not a path
@singersbalm In order to expedite the trouble-shooting process, please provide the code snippet to reproduce the issue reported here. Thank you!
This issue is stale because it has been open for 7 days with no activity. It will be closed if no further activity occurs. Thank you.
This issue was closed because it has been inactive for 7 days since being marked as stale. Please reopen if you'd like to work on this further.