From the docs 57:

input of shape (seq_len, batch, input_size): tensor containing the features of the input sequence. …

How many features does each sample contain?
Assuming it’s just a single feature, each batch should have the shape [100, 20, 1] using the default setup.
However, if you specify batch_first=True, you would need to pass your data as [20, 100, 1].