this way @Damian_Andrysiak
>>> linear = torch.nn.Linear(3, 3)
>>> inputs = torch.rand(3, 3)
>>> 
>>> linear(inputs)
tensor([[-0.4848,  0.4174, -0.1633],
        [-0.4428,  0.5404, -0.1470],
        [-0.7272,  0.0770,  0.0321]], grad_fn=<AddmmBackward0>)
>>> torch.mm(inputs, linear.weight.T).add(linear.bias)
tensor([[-0.4848,  0.4174, -0.1633],
        [-0.4428,  0.5404, -0.1470],
        [-0.7272,  0.0770,  0.0321]], grad_fn=<AddBackward0>)
>>> 

You were using weights and 1 instead of the layer parameters.