Description
When i use:
!python /content/drive/My\ Drive/PlasmaSimAI/RNN/1_train_predictor.py --data ecg --filename chfdbchf15.pkl --save_fig
in Google colab the following error occurs:
=> Start training from scratch
Namespace(augment=True, batch_size=64, bptt=50, clip=10, data='ecg', device='cuda', dropout=0.2, emsize=32, epochs=50, eval_batch_size=64, filename='chfdbchf15.pkl', log_interval=10, lr=0.0002, model='LSTM', nhid=32, nlayers=2, prediction_window_size=10, pretrained=False, res_connection=False, resume=False, save_fig=True, save_interval=10, seed=1111, teacher_forcing_ratio=0.7, tied=False, weight_decay=0.0001)
| epoch 1 | 10/ 31 batches | ms/batch 133.2217 | loss 2.27
| epoch 1 | 20/ 31 batches | ms/batch 117.8518 | loss 1.95
| epoch 1 | 30/ 31 batches | ms/batch 117.6507 | loss 2.02
| end of epoch 1 | time: 4.70s | valid loss 1.6075 |
Traceback (most recent call last):
File "/content/drive/My Drive/PlasmaSimAI/RNN/1_train_predictor.py", line 326, in
generate_output(args,epoch,model,gen_dataset,startPoint=1500)
File "/content/drive/My Drive/PlasmaSimAI/RNN/1_train_predictor.py", line 141, in generate_output
target= preprocess_data.reconstruct(gen_dataset.cpu().numpy(), TimeseriesData.mean, TimeseriesData.std)
File "/content/drive/My Drive/PlasmaSimAI/RNN/preprocess_data.py", line 18, in reconstruct
return seqData*std+mean
TypeError: mul(): argument 'other' (position 1) must be Tensor, not numpy.ndarray
When you remove --save_fig the code works as expected. Is this a bug or am i doing something wrong?