Repeating weights for a single axis of the pretrained model

Hello everyone,
I have a pretrained model that accepts 50,25,25,60 inputs. Now, I want to use it for 1000,25,25,60 inputs assuming that the first axis weights can be repeated 20 times to fit the new settings (1000/50 = 20). How can I do so?

Usually the batch dimension would be in dim0, so that you wouldn’t have to change anything.
However, if you are using a custom model without a batch dimension (or in another dim), you could use the repeat or expand function on the parameter(s).