My model outputs a tensor of values between 0 and 1 and the ground truth is one hot encoded. How to calculate the accuracy using these 2 tensors.
for X_train_batch, y_train_batch in train_loader:
    X_train_batch, y_train_batch = X_train_batch.to(device), y_train_batch.to(device)

    optimizer.zero_grad()

    

    y_train_pred = model(X_train_batch)

         

    train_loss = criterion(y_train_pred, y_train_batch)

    train_acc = multi_acc(y_train_pred, y_train_batch)

    

    train_loss.backward()

    optimizer.step()

    

    train_epoch_loss += train_loss.item()

    train_epoch_acc += train_acc.item()