I’m sorry, I cannot publish the dataset. Input dimension is (242 timesteps, 20 sequences, 10 input dim), output is (242, 20, 2). This is my full code with a random generated dataset so you can run it.
import torch
import torch.nn as nn
from torch.autograd import Variable
from torch.nn.modules.loss import  _Loss, _assert_no_grad
import torch.optim as optim
import numpy as np
import time

BATCH_SIZE = 1
INPUT_DIM = 10
OUTPUT_DIM = 2
EPOCHS = 1000


def med_loss(input, target):
    return torch.mean(torch.sqrt(torch.sum(torch.pow(target - input, 2))))


class MEDLoss(_Loss):
    def __init__(self):
        super(MEDLoss, self).__init__()

    def forward(self, input, target):
        _assert_no_grad(target)
        return med_loss(input, target)


class Net(nn.Module):
    def __init__(self, input_dim, hidden_dim, output_dim, hidden_layers):
        super(Net, self).__init__()
        self.input_dim = input_dim
        self.hidden_dim = hidden_dim
        self.output_dim = output_dim
        self.hidden_layers = hidden_layers

        self.lstm = nn.LSTM(input_dim, hidden_dim, hidden_layers)
        self.h2o = nn.Linear(hidden_dim, output_dim)

    def forward(self, x):
        h_t = Variable(torch.randn(self.hidden_layers, BATCH_SIZE, self.hidden_dim)).cuda()
        c_t = Variable(torch.randn(self.hidden_layers, BATCH_SIZE, self.hidden_dim)).cuda()

        h_t, c_t = self.lstm(x, (h_t, c_t))
        output = self.h2o(h_t)
        return output


print("Loading data")
X_data = torch.randn((242, 20, INPUT_DIM))
Y_data = torch.rand((242, 20, OUTPUT_DIM)) * 10
seq_lenghts = np.ones(20) * 242

model = Net(INPUT_DIM, 40, OUTPUT_DIM, 1).cuda()
loss_fcn = MEDLoss()
optimizer = optim.RMSprop(model.parameters())

for epoch in range(EPOCHS):
    loss = 0
    start = time.time()
    for seq in range(11, 20):
        length = seq_lenghts[seq]
        x = Variable(X_data[:length, [seq], :]).cuda()
        y = Variable(Y_data[:length, [seq], :]).cuda()
        model.zero_grad()
        output = model(x)
        loss = loss_fcn(output, y)
        loss.backward()
        optimizer.step()
    print("Epoch", epoch + 1, "Loss:", loss.cpu().data.numpy(), "Time:", time.time() - start)