What if I want to use that embedding in another class. I was thinking to do something like:
Class A(nn.Module):
...
def __init__(...)
    self.word_embedding = nn.Embedding(size,hidden)
...
def forward()
...

and there is another class
Class B(nn.Module):
...
def __init__(...)
...
def forward(self,word_embedding_layer_of_class_A)
...

but since I have defined my moduls as:
a = A()
b = B()
a_optim = optim(a.parameters())
b_optim = optim(b.parameters())

I had some doubts if it produces some problems with gradients.