Closed bpodq closed 6 years ago
I think this might be python2.7 specific. The code has been tested on python3 only.
Loaded training data...
Traceback (most recent call last):
File "D:\Machine_Learning\LSTM\Tensorflow CNN-LSTM Model\SampleTextLSTM.py", line 59, in
Running python 3.6.2, same thing happening here.
I had the same Issue, I fixed it by changing line 42
content = np.reshape(content, [-1, ])
to content = np.hstack(content)
Loaded training data... Traceback (most recent call last): File "rnn_words.py", line 56, in
dictionary, reverse_dictionary = build_dataset(training_data)
File "rnn_words.py", line 49, in build_dataset
count = collections.Counter(words).most_common()
File "/usr/lib64/python2.7/collections.py", line 444, in init
self.update(iterable, **kwds)
File "/usr/lib64/python2.7/collections.py", line 526, in update
self[elem] = self_get(elem, 0) + 1
TypeError: unhashable type: 'list'
I searched the web but do not solve it, anyone can help me?