class Test:
def __init__(self,):
def __call__(self, [parameters])
test = Test(parameters)
test(arguments)
class NewModule(nn.Module):
def __init__(self,)
def forward(self, [parameters])
newModule = NewModue(parameters)
newModule(arguments)
So, the difference is __call__ is for any normal classes while forward is for torch Modules.