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

TypeError: Fetch argument None has invalid type <class 'NoneType'> #28

Open
cvJie opened this issue Nov 22, 2018 · 1 comment
Open

TypeError: Fetch argument None has invalid type <class 'NoneType'> #28

cvJie opened this issue Nov 22, 2018 · 1 comment

Comments

@cvJie
Copy link

cvJie commented Nov 22, 2018

what happend??how to solve it? thanks
I want to train this model use own datasests,just change the datasetpath,but error is:

2018-11-22 17:13:28.944300: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1423] Adding visible gpu devices: 0
2018-11-22 17:13:29.488915: I tensorflow/core/common_runtime/gpu/gpu_device.cc:911] Device interconnect StreamExecutor with strength 1 edge matrix:
2018-11-22 17:13:29.488996: I tensorflow/core/common_runtime/gpu/gpu_device.cc:917] 0
2018-11-22 17:13:29.489019: I tensorflow/core/common_runtime/gpu/gpu_device.cc:930] 0: N
2018-11-22 17:13:29.489518: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1041] Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:0 with 18335 MB memory) -> physical GPU (device: 0, name: Tesla P40, pci bus id: 0000:af:00.0, compute capability: 6.1)
WARNING:tensorflow:Error encountered when serializing regularization_losses.
Type is unsupported, or the types of the items don't match field type in CollectionDef.
'NoneType' object has no attribute 'name'
Running training
training a epoch...
Traceback (most recent call last):
File "train.py", line 519, in
main(parse_arguments(sys.argv[1:]))
File "train.py", line 182, in main
total_loss, train_op, summary_op, summary_writer, regularization_losses, args.learning_rate_schedule_file)
File "train.py", line 248, in train
err, _, step, reg_loss, summary_str = sess.run([loss, train_op, global_step, regularization_losses, summary_op], feed_dict=feed_dict)
File "/opt/anaconda3/lib/python3.6/site-packages/tensorflow/python/client/session.py", line 905, in run
run_metadata_ptr)
File "/opt/anaconda3/lib/python3.6/site-packages/tensorflow/python/client/session.py", line 1125, in _run
self._graph, fetches, feed_dict_tensor, feed_handles=feed_handles)
File "/opt/anaconda3/lib/python3.6/site-packages/tensorflow/python/client/session.py", line 427, in init
self._fetch_mapper = _FetchMapper.for_fetch(fetches)
File "/opt/anaconda3/lib/python3.6/site-packages/tensorflow/python/client/session.py", line 245, in for_fetch
return _ListFetchMapper(fetch)
File "/opt/anaconda3/lib/python3.6/site-packages/tensorflow/python/client/session.py", line 352, in init
self._mappers = [_FetchMapper.for_fetch(fetch) for fetch in fetches]
File "/opt/anaconda3/lib/python3.6/site-packages/tensorflow/python/client/session.py", line 352, in
self._mappers = [_FetchMapper.for_fetch(fetch) for fetch in fetches]
File "/opt/anaconda3/lib/python3.6/site-packages/tensorflow/python/client/session.py", line 245, in for_fetch
return _ListFetchMapper(fetch)
File "/opt/anaconda3/lib/python3.6/site-packages/tensorflow/python/client/session.py", line 352, in init
self._mappers = [_FetchMapper.for_fetch(fetch) for fetch in fetches]
File "/opt/anaconda3/lib/python3.6/site-packages/tensorflow/python/client/session.py", line 352, in
self._mappers = [_FetchMapper.for_fetch(fetch) for fetch in fetches]
File "/opt/anaconda3/lib/python3.6/site-packages/tensorflow/python/client/session.py", line 242, in for_fetch
type(fetch)))
TypeError: Fetch argument None has invalid type <class 'NoneType'>

@lxfantasy
Copy link

I also have this problem.Do you resolve this problem?

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

2 participants