Kats, a kit to analyze time series data, a lightweight, easy-to-use, generalizable, and extendable framework to perform time series analysis, from understanding the key statistics and characteristics, detecting change points and anomalies, to forecasting future trends.
MIT License
4.89k
stars
536
forks
source link
AttributeError: 'LSTMForecast' object has no attribute 'hidden_cell' #184
Traceback (most recent call last):
File "/home/kats/kats_prediction.py", line 214, in
fcst_df = predict_lstm(ts)
File "/home/kats/kats_prediction.py", line 53, in predict_lstm
fcst = lstm.predict(steps=60)
File "/home/miniconda3/envs/kats/lib/python3.7/site-packages/kats/models/lstm.py", line 236, in predict
test_inputs.append(self.model(seq).item())
File "/home/miniconda3/envs/kats/lib/python3.7/site-packages/torch/nn/modules/module.py", line 1102, in _call_impl
return forward_call(*input, **kwargs)
File "/home/miniconda3/envs/kats/lib/python3.7/site-packages/kats/models/lstm.py", line 95, in forward
lstm_out, self.hidden_cell = self.lstm(input_seq.view(len(input_seq), 1, -1), self.hidden_cell)
File "/home/miniconda3/envs/kats/lib/python3.7/site-packages/torch/nn/modules/module.py", line 1178, in getattr
type(self).name, name))
AttributeError: 'LSTMForecast' object has no attribute 'hidden_cell'
I‘ve encountered this error:
Traceback (most recent call last): File "/home/kats/kats_prediction.py", line 214, in
fcst_df = predict_lstm(ts)
File "/home/kats/kats_prediction.py", line 53, in predict_lstm
fcst = lstm.predict(steps=60)
File "/home/miniconda3/envs/kats/lib/python3.7/site-packages/kats/models/lstm.py", line 236, in predict
test_inputs.append(self.model(seq).item())
File "/home/miniconda3/envs/kats/lib/python3.7/site-packages/torch/nn/modules/module.py", line 1102, in _call_impl
return forward_call(*input, **kwargs)
File "/home/miniconda3/envs/kats/lib/python3.7/site-packages/kats/models/lstm.py", line 95, in forward
lstm_out, self.hidden_cell = self.lstm(input_seq.view(len(input_seq), 1, -1), self.hidden_cell)
File "/home/miniconda3/envs/kats/lib/python3.7/site-packages/torch/nn/modules/module.py", line 1178, in getattr
type(self).name, name))
AttributeError: 'LSTMForecast' object has no attribute 'hidden_cell'
My torch version is 1.10.0
Could you please help me with this?