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
File "main_cifar.py", line 174, in main
run_train_loop(net1, optimizer1, sched1, net2, optimizer2, sched2, criterion, CEloss, CE, loader, args.p_threshold,
File "/home/nikkokks/labelr/C2D/train_cifar.py", line 148, in run_train_loop
train(epoch, net1, net2, criterion, optimizer1, labeled_trainloader, unlabeled_trainloader, lambda_u,
File "/home/nikkokks/labelr/C2D/train.py", line 66, in train
targets_x, targets_u = co_guess(net, net2, inputs_x, inputs_u, inputs_x2, inputs_u2, w_x, labels_x, T,
File "/home/nikkokks/labelr/C2D/train.py", line 25, in co_guess
outputs_x = net(inputs_x)
File "/home/nikkokks/.local/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1501, in _call_impl
return forward_call(*args, **kwargs)
File "/home/nikkokks/.local/lib/python3.8/site-packages/torchvision/models/resnet.py", line 285, in forward
return self._forward_impl(x)
File "/home/nikkokks/.local/lib/python3.8/site-packages/torchvision/models/resnet.py", line 276, in _forward_impl
x = self.layer4(x)
File "/home/nikkokks/.local/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1501, in _call_impl
return forward_call(*args, **kwargs)
File "/home/nikkokks/.local/lib/python3.8/site-packages/torch/nn/modules/container.py", line 217, in forward
input = module(input)
File "/home/nikkokks/.local/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1501, in _call_impl
return forward_call(*args, **kwargs)
File "/home/nikkokks/.local/lib/python3.8/site-packages/torchvision/models/resnet.py", line 93, in forward
out = self.bn1(out)
File "/home/nikkokks/.local/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1501, in _call_impl
return forward_call(*args, **kwargs)
File "/home/nikkokks/.local/lib/python3.8/site-packages/torch/nn/modules/batchnorm.py", line 171, in forward
return F.batch_norm(
File "/home/nikkokks/.local/lib/python3.8/site-packages/torch/nn/functional.py", line 2448, in batch_norm
_verify_batch_size(input.size())
File "/home/nikkokks/.local/lib/python3.8/site-packages/torch/nn/functional.py", line 2416, in _verify_batch_size
raise ValueError("Expected more than 1 value per channel when training, got input size {}".format(size))
ValueError: Expected more than 1 value per channel when training, got input size torch.Size([1, 512, 1, 1])
I suppose this is due to the last batch_size.
Do you have a better solution than activating drop_last = True ?
The text was updated successfully, but these errors were encountered:
Hi I try to do a benchmark on cifar100 with 80% noisy labels with resnet18.
This is the command
but at a random epoch it throws this
I suppose this is due to the last batch_size.
Do you have a better solution than activating drop_last = True ?
The text was updated successfully, but these errors were encountered: