Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use python train.py --load_model XXXX problem #121

Open
lvjinqiao opened this issue Aug 2, 2020 · 0 comments
Open

Use python train.py --load_model XXXX problem #121

lvjinqiao opened this issue Aug 2, 2020 · 0 comments

Comments

@lvjinqiao
Copy link

I am not native English speaker. I hope you understand what I'm talking about。
When i use this command “ python train.py --load_model XXXX problem” to restore my Neural network model。
I got the following problems.

"***********************************"
Traceback (most recent call last):
File "D:\python\lib\site-packages\tensorflow\python\framework\importer.py", line 497, 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_Reader._parse_data_976' 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 "train.py", line 138, in
tf.app.run()
File "D:\python\lib\site-packages\tensorflow\python\platform\app.py", line 40, in run
_run(main=main, argv=argv, flags_parser=_parse_flags_tolerate_undef)
File "D:\python\lib\site-packages\absl\app.py", line 299, in run
_run_main(main, args)
File "D:\python\lib\site-packages\absl\app.py", line 250, in _run_main
sys.exit(main(argv))
File "train.py", line 134, in main
train()
File "train.py", line 83, in train
restore = tf.train.import_meta_graph(meta_graph_path)
File "D:\python\lib\site-packages\tensorflow\python\training\saver.py", line 1462, in import_meta_graph
**kwargs)[0]
File "D:\python\lib\site-packages\tensorflow\python\training\saver.py", line 1486, in _import_meta_graph_with_return_elements
**kwargs))
File "D:\python\lib\site-packages\tensorflow\python\framework\meta_graph.py", line 799, in import_scoped_meta_graph_with_return_elements
return_elements=return_elements)
File "D:\python\lib\site-packages\tensorflow\python\util\deprecation.py", line 507, in new_func
return func(args, **kwargs)
File "D:\python\lib\site-packages\tensorflow\python\framework\importer.py", line 405, in import_graph_def
producer_op_list=producer_op_list)
File "D:\python\lib\site-packages\tensorflow\python\framework\importer.py", line 501, in _import_graph_def_internal
raise ValueError(str(e))
ValueError: Cannot add function '__inference_Dataset_map_Reader._parse_data_976' because a different function with the same name already exists.
"
************************************************"
Do you know why?
Thanks a lot.
By the way By the way, I used tensorflow 2.0, so I modified a part of your code, but I only modified the generator、discriminator and reader

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant