You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I got a situation where I trained a model and saved its checkpoint files, then I need to restore the graph from the meta file and feed a new data iterator to keep training, so i find a issue talking about that, then i write some code to demo my situation.
Current behavior
When i use ParquetDataset to feed, i can't restore the meta file, and got the following error:
Traceback (most recent call last):
File "/home/pai/lib/python3.6/site-packages/tensorflow_core/python/framework/importer.py", line 501, in _import_graph_def_internal
graph._c_graph, serialized, options) # pylint: disable=protected-access
tensorflow.python.framework.errors_impl.InvalidArgumentError: Cannot add function '__inference_Dataset_flat_map__create_dataset_10' because a different function with the same name already exists.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "test/io/restore_hb.py", line 223, in <module>
resume_training(another_train_dataset, another_test_dataset)
File "test/io/restore_hb.py", line 132, in resume_training
saver = tf.train.import_meta_graph('checkpoints_hb/fufu.meta')
File "/home/pai/lib/python3.6/site-packages/tensorflow_core/python/training/saver.py", line 1697, in import_meta_graph
**kwargs)[0]
File "/home/pai/lib/python3.6/site-packages/tensorflow_core/python/training/saver.py", line 1721, in _import_meta_graph_with_return_elements
**kwargs))
File "/home/pai/lib/python3.6/site-packages/tensorflow_core/python/framework/meta_graph.py", line 809, in import_scoped_meta_graph_with_return_elements
return_elements=return_elements)
File "/home/pai/lib/python3.6/site-packages/tensorflow_core/python/util/deprecation.py", line 507, in new_func
return func(*args, **kwargs)
File "/home/pai/lib/python3.6/site-packages/tensorflow_core/python/framework/importer.py", line 405, in import_graph_def
producer_op_list=producer_op_list)
File "/home/pai/lib/python3.6/site-packages/tensorflow_core/python/framework/importer.py", line 505, in _import_graph_def_internal
raise ValueError(str(e))
ValueError: Cannot add function '__inference_Dataset_flat_map__create_dataset_10' because a different function with the same name already exists.
I guess that error not belongs to a bug for HybridBackend, because i also try the TFRecordDataset and get a similar error:
Traceback (most recent call last):
File "/home/pai/lib/python3.6/site-packages/tensorflow_core/python/framework/importer.py", line 501, in _import_graph_def_internal
graph._c_graph, serialized, options) # pylint: disable=protected-access
tensorflow.python.framework.errors_impl.InvalidArgumentError: Cannot add function '__inference_Dataset_map__parse_function_55' because a different function with the same name already exists.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "test/io/restore_pb.py", line 225, in <module>
restore_feed()
File "test/io/restore_pb.py", line 220, in restore_feed
resume_training(another_train_dataset, another_test_dataset)
File "test/io/restore_pb.py", line 155, in resume_training
saver = tf.train.import_meta_graph('checkpoints_pb/fufu.meta')
File "/home/pai/lib/python3.6/site-packages/tensorflow_core/python/training/saver.py", line 1697, in import_meta_graph
**kwargs)[0]
File "/home/pai/lib/python3.6/site-packages/tensorflow_core/python/training/saver.py", line 1721, in _import_meta_graph_with_return_elements
**kwargs))
File "/home/pai/lib/python3.6/site-packages/tensorflow_core/python/framework/meta_graph.py", line 809, in import_scoped_meta_graph_with_return_elements
return_elements=return_elements)
File "/home/pai/lib/python3.6/site-packages/tensorflow_core/python/util/deprecation.py", line 507, in new_func
return func(*args, **kwargs)
File "/home/pai/lib/python3.6/site-packages/tensorflow_core/python/framework/importer.py", line 405, in import_graph_def
producer_op_list=producer_op_list)
File "/home/pai/lib/python3.6/site-packages/tensorflow_core/python/framework/importer.py", line 505, in _import_graph_def_internal
raise ValueError(str(e))
ValueError: Cannot add function '__inference_Dataset_map__parse_function_55' because a different function with the same name already exists.
But that process works for from_tensor_slices and CsvDataset, i'm just curious and want to know how to restore and feed a new dataset iterator.
Expected behavior
When i use ParquetDataset in traing, i can restore the checkpoint and feed a new ParquetDataset iterator
System information
GPU model and memory: 16G for Tesla T4
OS Platform: Ubuntu 18.04.5 LTS (Bionic Beaver)
Docker version: 20.10.14
GCC/CUDA/cuDNN version: gcc version 7.5.0 (Ubuntu 7.5.0-3ubuntu1~18.04),
I got a situation where I trained a model and saved its checkpoint files, then I need to restore the graph from the meta file and feed a new data iterator to keep training, so i find a issue talking about that, then i write some code to demo my situation.
Current behavior
When i use ParquetDataset to feed, i can't restore the meta file, and got the following error:
I guess that error not belongs to a bug for HybridBackend, because i also try the TFRecordDataset and get a similar error:
But that process works for from_tensor_slices and CsvDataset, i'm just curious and want to know how to restore and feed a new dataset iterator.
Expected behavior
When i use ParquetDataset in traing, i can restore the checkpoint and feed a new ParquetDataset iterator
System information
Code to reproduce
training and restore use ParquetDataset to feed that doesn't work
It works neither for TFRecordDataset.
But works for CsvDataset
Willing to contribute
Yes
The text was updated successfully, but these errors were encountered: