Hi,
I have a seq2seq encoder model (Custom class), of which I want to access the RNN properties such as:
- hidden state size
- number of layers
- number of directions.
I am able to get the LSTM object (‘torch.nn.modules.rnn.LSTM’) by invoking the ._modules property on the encoder model. On printing the LSTM object, I see this output:
LSTM(500, 250, num_layers=2, dropout=0.3, bidirectional=True)
How do I access these items from the LSTM object?