Batch in nn.LSTM

I have doubt in nn.LSTM, what does batch mean here?
for eg if my seque

nce is sequence of characters then what does this batch means?

A batch is a collection of samples, i.e. instead of passing a single sample with a specified sequence length and the number of features, you can pass multiple samples as once, which will be processed in one go.
All modules accept batched data, as this will usually speed up your training.

does it defines the batch size? or no of batches?

The batch dimension in input defines the batch size.

1 Like