reset_states() failure in a stateful network with initial_states set and training in batch - TypeError: 'NoneType' object is not subscriptable
See original GitHub issueFollowing is the stacktrace -
Traceback (most recent call last):
File "/usr/local/Cellar/python/3.6.5_1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "/usr/local/Cellar/python/3.6.5_1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/Users/manoj/Desktop/repos/yane/yane/LSTM/manytomanyLSTM.py", line 137, in <module>
incremental_train(space)
File "/Users/manoj/Desktop/repos/yane/yane/LSTM/manytomanyLSTM.py", line 128, in incremental_train
model.reset_states()
File "/usr/local/lib/python3.6/site-packages/keras/engine/topology.py", line 1968, in reset_states
layer.reset_states()
File "/usr/local/lib/python3.6/site-packages/keras/layers/recurrent.py", line 681, in reset_states
batch_size = self.input_spec[0].shape[0]
TypeError: 'NoneType' object is not subscriptable
Issue Analytics
- State:
- Created 5 years ago
- Comments:6
Top Results From Across the Web
reset_states() failure in a stateful network with initial_states ...
reset_states() failure in a stateful network with initial_states set and training in batch - TypeError: 'NoneType' object is not subscriptable #25985.
Read more >"TypeError: 'NoneType' object is not subscriptable" I'm ...
"TypeError: 'NoneType' object is not subscriptable" I'm having trouble fixing this problem. building a neural network in python.
Read more >Python TypeError: 'NoneType' object is not subscriptable
If you try to access an item from a None value using indexing, you encounter a “TypeError: 'NoneType' object is not subscriptable” error....
Read more >CS50AI TICTACTOE - 'NoneType' object is not subscriptable
I've been reading through my codes, although i know where my error is, i do not know how to go about solving it....
Read more >Time Series Analysis: KERAS LSTM Deep Learning - Part 1
Learn time series analysis with Keras LSTM deep learning. Learn to predict sunspots ten years into the future with an LSTM deep learning ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I ran into this issue today with TF 2.0 preview.
Raised an issue at https://github.com/tensorflow/tensorflow/issues/25985
Steps to reproduce: If the initial_states is removed, the code works.