I am trying to use Linear class of Pytorch module.In this automatically forward method is called once I create an instance of the class.Can anyone explain me from basics (If I can get code of Linear class of pytorch that would be great)
from torch.nn mport Linear
model=Linear(in_features=1,out_features=1)
x=torch.tensor([1])
y=model(x)
I am not able to understand how model(x) displays the result.As per my understanding model.forward() should display the actual result It would be great if someone explain me from basics (Would be great if someone can share the link of code of Linear class in pytorch)