Time series Timeseries Deep Learning Machine Learning Python Pytorch fastai | State-of-the-art Deep Learning library for Time Series and Sequences in Pytorch / fastai
Everything works until
probas, _, preds = learn.get_X_preds(X[splits[1]]) skm.mean_squared_error(y[splits[1]], preds, squared=False)
which returns
`
RuntimeError Traceback (most recent call last)
in ()
----> 1 probas, _, preds = learn.get_X_preds(X[splits[1]])
2 skm.mean_squared_error(y[splits[1]], preds, squared=False)
12 frames
/usr/local/lib/python3.7/dist-packages/torch/_tensor.py in __torch_function__(cls, func, types, args, kwargs)
1021
1022 with _C.DisableTorchFunction():
-> 1023 ret = func(*args, **kwargs)
1024 return _convert(ret, cls)
1025
RuntimeError: The size of tensor a (42) must match the size of tensor b (24) at non-singleton dimension 1
`
Hi @meanpenguin,
Thanks for raising this issue.
There was a small bug in the code that I've just fixed. I've re-run the code in Colab and it works well again.
Using the link to colab in the documentation site
Installed tsai using:
!pip install -Uqq git+https://github.com/timeseriesAI/tsai.git
tsai : 0.2.18 fastai : 2.4 fastcore : 1.3.20 torch : 1.9.0+cu102Everything works until
probas, _, preds = learn.get_X_preds(X[splits[1]]) skm.mean_squared_error(y[splits[1]], preds, squared=False)
which returns ` RuntimeError Traceback (most recent call last)