Hi,
You might want to check how the weights are stored by Theano and Pytorch.
For example, if I remember correctly, a forward for a linear is np.matmul(layer1_out, layer2_w.t()) + layer2_b (notice the extra transpose). Not sure how Theano stores the weights.