Dropout in LSTMCell

How to implement dropout if I’m using LSTMCell instead of LSTM?
Let’s stick to the sine-wave example because my architecture is similar:

If I try to update weights by accessing them directly

self.lstmCell_1 = nn.LSTMCell(self.input_features, self.hidden_features)
self.dropout = nn.Dropout(p=0.1, inplace=True)

it results in an error.

I don’t want to implement my own LSTMCell, neither do I want to use LSTM, because I need predictions to be made further in time, not just the single next value, therefore I need to control the flow of data between LSTMCell units like in the sine-wave example.

Any ideas?

Or maybe it is possible to realize the same sine-wave predictor with just LSTM without going into data flow control of LSTMCell?