Keras implementation:
import numpy as np
from keras.models import Sequential
from keras.layers import Dense, CuDNNLSTM
from keras.utils import print_summary
from keras import backend as K


def mean_eucl_dist(y_true, y_pred):
    return K.mean(K.sqrt(K.sum(K.square(y_true - y_pred), axis=-1, keepdims=True)))


X_data = np.random.randn((20, 242, 10))
Y_data = np.random.rand((20, 242, 2)) * 10

model = Sequential()
model.add(CuDNNLSTM(40, return_sequences=True, input_shape=(242, 10)))
model.add(Dense(2, activation='linear'))

model.compile(loss=mean_eucl_dist,
              optimizer='rmsprop',
              metrics=[mean_eucl_dist])

model.fit(X_data[11:, :, :], Y_data[11:, :, :], batch_size=242, epochs=10000, shuffle=True)