You can add code using three backticks (```).
I’ve formatted your code for you. 
The different values are due to an additional “random operation” for Net2.
While you are setting the random seed for Net1 directly before sampling the parameters, you create the linear layer for Net2 first, and then sample the parameters again.
Add T.manual_seed(1) directly before T.nn.init.uniform_ in Net2 and you will get the same values.