I meant something like:
y = F.linear(x, emb_mod.weight.t())

So you don’t need to assign something back to a module ever . And in generally you shouldn’t assign to a Module’s parameter in an optimization loop.