AdderNetCuda
AdderNetCuda copied to clipboard
Issue while running train.py
I followed the instructions in the readme file to run the code and getting the following error. Am I doing something wrong?
File "/content/utils.py", line 39, in accuracy correct_k = correct[:k].view(-1).float().sum(0, keepdim=True) 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.
I have not made any changes to the code.
This problem is very common. You could google .contiguous() and put .contiguous before .view(-1)