adeshpande3 / LSTM-Sentiment-Analysis

Sentiment Analysis with LSTMs in Tensorflow
MIT License
979 stars 432 forks source link

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

Closed marleymwangi closed 6 years ago

marleymwangi commented 6 years ago

Hi, first thing: your project is very interesting. Second: I got an error at the execution at

summary = sess.run( merged , {input_data: nextBatch, labels: nextBatchLabels})

Do you have any ideas how to fix it ?

Thank you in advance

Traceback (most recent call last): File "Oriole+LSTM.py", line 220, in summary = sess.run( merged , {input_data: nextBatch, labels: nextBatchLabels}) File "C:\Anaconda\Anaconda3\envs\tensorflow\lib\site-packages\tensorflow\python\client\session.py", line 789, in run run_metadata_ptr) File "C:\Anaconda\Anaconda3\envs\tensorflow\lib\site-packages\tensorflow\python\client\session.py", line 984, in _run self._graph, fetches, feed_dict_string, feed_handles=feed_handles) File "C:\Anaconda\Anaconda3\envs\tensorflow\lib\site-packages\tensorflow\python\client\session.py", line 410, in init self._fetch_mapper = _FetchMapper.for_fetch(fetches) File "C:\Anaconda\Anaconda3\envs\tensorflow\lib\site-packages\tensorflow\python\client\session.py", line 227, in for_fetch (fetch, type(fetch))) TypeError: Fetch argument None has invalid type <class 'NoneType'>

adeshpande3 commented 6 years ago

It seems as though the merged variable doesn't have any value assigned to it. Do you want to upload your results to Tensorboard? That's the only reason you should be running that particular sess.run command. If you do want to upload, then you need to make sure that you've run the following code which defines merged.

image

marleymwangi commented 6 years ago

Thanks a lot. Fixed my problem