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'> #15

Open
crazysunsir opened this issue Jan 10, 2022 · 0 comments
Open

Comments

@crazysunsir
Copy link

Traceback (most recent call last):
File "train_punct_attentive_model.py", line 86, in
model.train(train_set, valid_data, valid_text, test_texts)
File "/home/dell/桌面/punc/neural_sequence_labeling-master/models/punct_attentive_model.py", line 149, in train
self._add_summary()
File "/home/dell/桌面/punc/neural_sequence_labeling-master/models/base_model.py", line 68, in _add_summary
summary_str = self.sess.run(self.summary)
File "/home/dell/.local/lib/python3.8/site-packages/tensorflow/python/client/session.py", line 967, in run
result = self._run(None, fetches, feed_dict, options_ptr,
File "/home/dell/.local/lib/python3.8/site-packages/tensorflow/python/client/session.py", line 1175, in _run
fetch_handler = _FetchHandler(
File "/home/dell/.local/lib/python3.8/site-packages/tensorflow/python/client/session.py", line 487, in init
self._fetch_mapper = _FetchMapper.for_fetch(fetches)
File "/home/dell/.local/lib/python3.8/site-packages/tensorflow/python/client/session.py", line 264, in for_fetch
raise TypeError('Fetch argument %r has invalid type %r' %
TypeError: Fetch argument None has invalid type <class 'NoneType'>

你好,错误日志如上,貌似是self.summary变量没有定义,请问该如何解决呢?谢谢

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