You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
python3 main.py data -a 'efficientnet-b4' --pretrained --batch-size 8
main.py:99: UserWarning: You have chosen a specific GPU. This will completely disable data parallelism.
warnings.warn('You have chosen a specific GPU. This will completely '
Use GPU: 1 for training
Loaded pretrained weights for efficientnet-b4
=> using pre-trained model 'efficientnet-b4'
Using image size 380
Traceback (most recent call last):
File "main.py", line 443, in
main()
File "main.py", line 117, in main
main_worker(args.gpu, ngpus_per_node, args)
File "main.py", line 265, in main_worker
train(train_loader, model, criterion, optimizer, epoch, args)
File "main.py", line 311, in train
acc1, acc5 = accuracy(output, target, topk=(1, 5))
File "main.py", line 437, 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.
Hi, @authman @vfdev-5 @consilium538 @ojdo @cove9988
I met this error when run main.py
python3 main.py data -a 'efficientnet-b4' --pretrained --batch-size 8
main.py:99: UserWarning: You have chosen a specific GPU. This will completely disable data parallelism.
warnings.warn('You have chosen a specific GPU. This will completely '
Use GPU: 1 for training
Loaded pretrained weights for efficientnet-b4
=> using pre-trained model 'efficientnet-b4'
Using image size 380
Traceback (most recent call last):
File "main.py", line 443, in
main()
File "main.py", line 117, in main
main_worker(args.gpu, ngpus_per_node, args)
File "main.py", line 265, in main_worker
train(train_loader, model, criterion, optimizer, epoch, args)
File "main.py", line 311, in train
acc1, acc5 = accuracy(output, target, topk=(1, 5))
File "main.py", line 437, 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.
What's wrong to me?
Thanks , in advance.
Best,
@bemoregt.
The text was updated successfully, but these errors were encountered: