Traceback (most recent call last): File "train.py", line 280, in <module> main() File "train.py", line 210, in main loss, acc = model(inputs) File "/home/michalislazarou/anaconda3/envs/metal/lib/python3.7/site-packages/torch/nn/modules/module.py", line 550, in __call__ result = self.forward(*input, **kwargs) File "/home/michalislazarou/PhD/TPN-torch/models.py", line 170, in forward emb_all = self.encoder(inp).view(-1,1600) RuntimeError: view size is not compatible with input tensor's size and stride (at least one dimension spans across two contiguous subspaces). Use .reshape(...) instead.
when I run the code I get the following error:
Traceback (most recent call last): File "train.py", line 280, in <module> main() File "train.py", line 210, in main loss, acc = model(inputs) File "/home/michalislazarou/anaconda3/envs/metal/lib/python3.7/site-packages/torch/nn/modules/module.py", line 550, in __call__ result = self.forward(*input, **kwargs) File "/home/michalislazarou/PhD/TPN-torch/models.py", line 170, in forward emb_all = self.encoder(inp).view(-1,1600) RuntimeError: view size is not compatible with input tensor's size and stride (at least one dimension spans across two contiguous subspaces). Use .reshape(...) instead.