Hello~ I have a question on different data shape to train convlstm model.
If the original data shape is [20, 10000, 64, 64], with the first 10 frames as input and the last 10 frames as predictions, and I want to change it so that the first 15 frames are input and the last 5 frames are predictions, how should I modify the code?
code:
def main():
###
# Common Params
###
artifact_dir = "./test_label_frame2"
input_seq_length = 15
train_batch_size = 32
validation_bath_size = 16
###
# Setup Pipeline
###
model_params: Seq2SeqParams = {
"input_seq_length": input_seq_length,
"num_layers": 2,
"num_kernels": 64,
"return_sequences": False,
"convlstm_params": {
"in_channels": 1,
"out_channels": 1,
"kernel_size": (3, 3),
"padding": "same",
"activation": "relu",
"frame_size": (64, 64),
"weights_initializer": WeightsInitializer.He,
},
}
erorr:
Traceback (most recent call last):
File ~/anaconda3/envs/convlstm/lib/python3.11/site-packages/spyder_kernels/py3compat.py:356 in compat_exec
exec(code, globals, locals)
File /data/ConvLSTM-test/examples/moving_mnist_convlstm.py:72
main()
File /data/ConvLSTM-test/examples/moving_mnist_convlstm.py:68 in main
experimenter.run()
File /data/ConvLSTM-test/pipelines/experimenter.py:44 in run
self.__evaluate()
File /data/ConvLSTM-test/pipelines/experimenter.py:74 in __evaluate
evaluator.run()
File /data/ConvLSTM-test/pipelines/evaluator.py:34 in run
pred_frames = self.__predict_frames(input, label) # 對輸入預測
File /data/ConvLSTM-test/pipelines/evaluator.py:63 in __predict_frames
pred_frames[:, :, frame_idx] = self.model(
IndexError: index 5 is out of bounds for dimension 2 with size 5
Hello~ I have a question on different data shape to train convlstm model.
If the original data shape is [20, 10000, 64, 64], with the first 10 frames as input and the last 10 frames as predictions, and I want to change it so that the first 15 frames are input and the last 5 frames are predictions, how should I modify the code?
code:
def main():
###
# Common Params
###
artifact_dir = "./test_label_frame2"
input_seq_length = 15
train_batch_size = 32
validation_bath_size = 16
###
# Setup Pipeline
###
model_params: Seq2SeqParams = {
"input_seq_length": input_seq_length,
"num_layers": 2,
"num_kernels": 64,
"return_sequences": False,
"convlstm_params": {
"in_channels": 1,
"out_channels": 1,
"kernel_size": (3, 3),
"padding": "same",
"activation": "relu",
"frame_size": (64, 64),
"weights_initializer": WeightsInitializer.He,
},
}
erorr:
Traceback (most recent call last):
File ~/anaconda3/envs/convlstm/lib/python3.11/site-packages/spyder_kernels/py3compat.py:356 in compat_exec
exec(code, globals, locals)
File /data/ConvLSTM-test/examples/moving_mnist_convlstm.py:72
main()
File /data/ConvLSTM-test/examples/moving_mnist_convlstm.py:68 in main
experimenter.run()
File /data/ConvLSTM-test/pipelines/experimenter.py:44 in run
self.__evaluate()
File /data/ConvLSTM-test/pipelines/experimenter.py:74 in __evaluate
evaluator.run()
File /data/ConvLSTM-test/pipelines/evaluator.py:34 in run
pred_frames = self.__predict_frames(input, label) # 對輸入預測
File /data/ConvLSTM-test/pipelines/evaluator.py:63 in __predict_frames
pred_frames[:, :, frame_idx] = self.model(
IndexError: index 5 is out of bounds for dimension 2 with size 5