We generally create parameters or layers in the init() but when we don’t know the dimensions and those should be inferred from the inputs coming to forward(), we need to create parameters in forward() .
How should I go about this ?
I have tried creating parameters and F.linear() in forward() but I don’t see those parameters getting added to the model.parameters() .