Skip to content

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

@crazysunsir

Description

@crazysunsir

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变量没有定义,请问该如何解决呢?谢谢

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions