Create a customised recurrent neural network

I guess this question should be asked but I couldn’t find it.

I want to create a customized recurrent neural network, for example, a different LSTM.
My thought is to create another class NewRNNModule which extends the RNNBase class.

But I think I also have to implement everything similar to the LSTM class.

Is it the only way or there is any easy way to do so?