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
test_input = torch.from_numpy(X_test)
test_label = torch.from_numpy(y_test)
# create the data loader for the test set
testset = torch.utils.data.TensorDataset(test_input, test_label)
testloader = torch.utils.data.DataLoader(testset, batch_size=opt.batch_size, shuffle=False, num_workers=0)
cnn.eval()
def train_SCU(X_train, y_train):
train_input = torch.from_numpy(X_train)
train_label = torch.from_numpy(y_train)
trainset = torch.utils.data.TensorDataset(train_input, train_label)
trainloader = torch.utils.data.DataLoader(trainset, batch_size=opt.batch_size, shuffle=True, num_workers=0)
cnn = SCU(opt, num_classes).to(device)
cnn.train()
ce_loss = nn.CrossEntropyLoss()
optimizer = torch.optim.Adam(cnn.parameters(), lr=opt.lr, weight_decay=opt.w_decay)
AttributeError: 'tuple' object has no attribute 'eval'
The text was updated successfully, but these errors were encountered: