@Chirath_Pansilu. This is the training part of the model
   for inputs, labels in train_dl:
        # send data and labels to the gpu
        src = inputs.to(device)
        labels = labels.to(device)
        # reset the gradients
        optimizer.zero_grad()
        # output predictions 
        pred_out,feas = model(src)
        #apply sigmoid to the output predictions of each class
        pred = sigmoid_fun(pred_out) 
        for i in range(num_classes):
                # define binary cross entropy loss
                binary_cross_entropy =  nn.BCELoss() #
                # make the ith class as 1 and all others as 0
                tgt_class_label = torch.eq(labels, i).float()
                # compute cross entropy between the target label and the ith class
                class_loss = binary_cross_entropy(pred[:,i],tgt_class_label)
                Loss+=class_loss
        # Loss = criterion(pred , labels)
        Loss.backward(retain_graph=True)
        optimizer.step()