Closed astu9880 closed 5 years ago
Hi, this might be due to the dimensionality of outputs
. The size of outputs
after averaging every frame is batch_size x classes
every_frame was set to True for the first command because of issue similar to this https://stackoverflow.com/questions/15008758/parsing-boolean-values-with-argparse. Hardcoding the value into the main program solved the issue
Getting this error while trying to run the code
Traceback (most recent call last): File "main.py", line 212, in <module> main() File "main.py", line 208, in main test_adam(args, use_gpu) File "main.py", line 181, in test_adam train_test(model, dset_loaders, criterion, 0, 'val', optimizer, args, logger, use_gpu, save_path) File "main.py", line 105, in train_test _, preds = torch.max(F.softmax(outputs, dim=1).data, 1) File "/usr/local/lib/python2.7/dist-packages/torch/nn/functional.py", line 768, in softmax return torch._C._nn.softmax(input, dim) RuntimeError: dimension out of range (expected to be in range of [-1, 0], but got 1)
Any ideas on how to go about debugging this?