If you want to you can also have two modules that share a weight matrix just by setting mod1.weight = mod2.weight, but the functional approach is likely to be less magical and harder to make a mistake with.