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
RuntimeError: Expected all tensors to be on the same device, but found at least two devices, cuda:1 and cuda:0! (when checking arugment for argument target in method wrapper_nll_loss_forward)
from torchvision.models.resnet import ResNet, Bottleneck
import torch.nn as nn
num_classes = 2
RuntimeError: Expected all tensors to be on the same device, but found at least two devices, cuda:1 and cuda:0! (when checking arugment for argument target in method wrapper_nll_loss_forward)
from torchvision.models.resnet import ResNet, Bottleneck
import torch.nn as nn
num_classes = 2
class CNN(ResNet):
def init(self, *args, **kwargs):
super(CNN, self).init(
Bottleneck, [3, 4, 6, 3], num_classes=num_classes, *args, **kwargs)
from torch.autograd import Variable
num_epochs = 10
def train(num_epochs, cnn, loaders):
train(num_epochs, cnn, loaders)
The text was updated successfully, but these errors were encountered: