Hi,
I solved the problem. As I mentioned at the very beginning this i classification problem with multiple classes. This is a time series where each step is one day.
I changed everything in this way and it works quite well:
class LSTM(nn.Module):
    def __init__(self, input_dim, hidden_dim, num_layers, output_dim):
        super(LSTM, self).__init__()
        self.hidden_dim = hidden_dim
        self.num_layers = num_layers
        
        self.lstm = nn.LSTM(input_dim, hidden_dim, num_layers)
        self.fc = nn.Linear(hidden_dim, output_dim) 
        
    def forward(self, x):
        h0 = torch.zeros(self.num_layers, x.size(0), self.hidden_dim)
        c0 = torch.zeros(self.num_layers, x.size(0), self.hidden_dim)
        out, (hn, cn) = self.lstm(x, (h0.detach(), c0.detach()))
        out = self.fc(out[-1]) 
        #out = F.softmax(out,dim=1)
        return out

input_dim = 62
hidden_dim = 80
num_layers = 1
output_dim = 3 #No of classes
num_epochs = 10

model = LSTM(input_dim=input_dim, hidden_dim=hidden_dim, output_dim=output_dim, num_layers=num_layers)
criterion = torch.nn.CrossEntropyLoss()
optimiser = torch.optim.Adam(model.parameters(), lr=0.01)

hist = np.zeros(10)
lstm = []
for t in range(num_epochs):
    for batch_idx, (inputs, targets) in enumerate(train_loader):
         #model.zero_grad()
         optimiser.zero_grad()
         y_train_pred = model(inputs)    

         loss = criterion(y_train_pred, targets.long())
         loss.backward()
         optimiser.step()
    print("Epoch ", t, "MSE: ", loss.item())
    hist[t] = loss.item()

Now I need to find out how to make the prediction to know the predicted category.