Is your feature request related to a problem? Please describe.
When we instantiate an instance of type class ContrastiveLoss we need to pass in the parameter for batch_size. This assumes that the batch size remains constant all through the training(which is not always the case).
Describe the solution you'd like
As we know and have fixed in the docs that the forward accepts inputs of shape B[F], why not pick up the Batch size dynamically in the forward. Is there a reason why it is not designed in that fashion?
I would be happy to put a pull request if it is okay.
Is your feature request related to a problem? Please describe.
When we instantiate an instance of type class
ContrastiveLosswe need to pass in the parameter forbatch_size. This assumes that the batch size remains constant all through the training(which is not always the case).Describe the solution you'd like
As we know and have fixed in the docs that the forward accepts inputs of shape
B[F], why not pick up the Batch size dynamically in the forward. Is there a reason why it is not designed in that fashion?I would be happy to put a pull request if it is okay.