From the docs, I don’t think there are restrictions on the batch_size for RNNs: http://pytorch.org/docs/master/nn.html?highlight=rnn#torch.nn.RNN 1 .
I don’t know much about RNNs, but why can’t you just pass in an input with a different batch_size than the one you trained with?
If the batch_size is a problem, couldn’t you pad the rows of your input with zeros or random data?