I have a dataset which has multiple targets attributes.
Sample targets for 12 data points (4 attributes as target outputs: not one-hot encoded):


 class Classifier(nn.Module):
    def __init__(self,input_nodes):
        super(Classifier, self).__init__()
        self.fc3 = nn.Linear(75000, 500)
        self.fc4 = nn.Linear(500, 200)
        self.fc5 = nn.Linear(200, 100)
        self.fc_out = nn.Linear(100, 4)
        self.dropout = nn.Dropout(0.5)
   
    def forward(self, x):
        x = F.relu(self.fc3(x))
        x = self.dropout(x)
        x = F.relu(self.fc4(x))
        x = self.dropout(x)
        x = F.relu(self.fc5(x))
        x = self.dropout(x)
        x = self.fc_out(x)
        return x

criterion = nn.CrossEntropyLoss()

 
for epoch in range(n_epochs):
	running_loss = 0
	i = 0
	model.train()
	for data, label in trainloader:
		 y_hat  = model(data) # Shape of y_hat = 6*4 (as 4 targets)
		 loss = criterion(y_hat, label) # Shape of label = 6*4
		 #--> Give error: RuntimeError: multi-target not supported at ..\aten\src\THNN/generic/ClassNLLCriterion.c:20
		
		 optimizer.zero_grad()
		 loss.backward()
		 optimizer.step()
		 train_loss.append(loss.item())
		 train_losses.append(loss.item())
		 running_loss += loss.item()

Error: RuntimeError: multi-target not supported at …\aten\src\THNN/generic/ClassNLLCriterion.c:20
How can I train and evaluate the multi-target classification problem?
Please help.