Hello People,
I am newbie, working with adult dataset.
I would please appreciate any help here on how to fix this.
iter = 0
for epoch in range(num_epochs):
for i, (inputs, labels) in enumerate(train_loader):
    # Load inputs as Variable
    inputs = Variable(X_trainTensor)
    labels = Variable(y_trainTensor).type(torch.LongTensor)
    
    #y_tensor = torch.tensor(y_train, dtype=torch.long, device=device)
    # Clear gradients w.r.t. parameters
    optimizer.zero_grad()
    
    # Forward pass to get output/logits
    outputs = model(inputs.float())
    
    # Calclate Loss: softmax --> cross entropy loss
    loss = criterion(outputs, labels)
    
    # Getting gradients w.r.t. parameters
    loss.backward()
    
    # Updating parameters
    optimizer.step()

Error:
RuntimeError                              Traceback (most recent call last)
 in 
72
73         # Calclate Loss: softmax --> cross entropy loss
—> 74         loss = criterion(outputs, labels)
75
76         # Getting gradients w.r.t. parameters
.
.
.
.
RuntimeError: multi-target not supported at …\aten\src\THNN/generic/ClassNLLCriterion.c:20