What does self.model(batch) do in pytorch?
I am currently rewriting a PyTorch code to tensorflow. During this I found a line that I don't understand, so I am not able to translate it to tensorflow.
Can someone explain me what this does/ means?
self.model(batch)


It seems like self.model is a layer/layers of a neural network, derived from nn.Module class.
The call self.model(batch) invoke's self.model's __call__ method with the argument batch.
If you inspect closely, nn.Module.__call__ do some &quot;bookkeeping&quot; but essentially, it calls the self.model's forward function.
