Solved by ptrblck in post #6 
              
              
                Sure, here is a simple example of using F.linear with a weight parameter: 
class MyModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.weight = nn.Parameter(torch.randn(4, 10))
        
    def forward(self, x):
        print(x.shape)
        x = F.linear(x, self.weight…