Solved by CedricLy in post #2 
              
              
                Try use this: 
torch.manual_seed(0)
input = torch.tensor([[1.,1.,1.]])
a = torch.nn.Linear(3, 1)
print(a.weight)
print(a.bias)
print(list(a.parameters()))
a(input)

Otherwise you will always create a new layer with different weights and biases. 
Line print(list(a.parameters())) needs to contain the …