enc = Encoder(WEIGHTS, HID_DIM, EMB_DIM, PERSONAS, PERSONA_DIM, DROPOUT).cuda()
dec = Decoder(EMB_DIM, PERSONA_DIM, HID_DIM, OUTPUT_DIM, DROPOUT).cuda()

device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')

model = Seq2Seq(enc, dec, len(characters), HID_DIM, device).to(device)

initialization of the model, as you can see i have 3 classes, one for encoder, one for decoder and one for seq2seq.
and inside encoder here is how i have used embedding,
class Encoder(nn.Module):
    def __init__(self, weights_matrix, hid_dim, emb_dim, personas, persona_dim, dropout):
        super().__init__()
        self.word_embedding = nn.Embedding.from_pretrained(weights_matrix, freeze = True)
        self.rnn = nn.GRU(emb_dim + persona_dim, hid_dim)
        self.dropout = nn.Dropout(dropout)
        self.persona_embedding = nn.Embedding(personas+10, persona_dim)

    def forward(self, src_sentence, src_speaker):
        """
        ------------------------------------------------------
        Encoder for Seq2seq persona embedding creation 
        Variable    ----    Size
        src_sentence        [batch size, sequence length]
        src_speaker         [batch size]  
        
        embedded_sentence   [batch size, sequence length, emb dim]
        embedded_speaker    [batch size, persona dim]

        emb_con             [batch size, sequence length, person dim + emb dim]
        emb_con(permute)    [sequence length, batch size, person dim + emb dim]

        hidden              [1, batch size, hidden dim]
        ------------------------------------------------------
        """
        embedded_sentence = self.word_embedding(src_sentence)
        embedded_speaker = self.dropout(self.persona_embedding(src_speaker))
        
        embedded_speaker = embedded_speaker.unsqueeze(1).repeat(1,embedded_sentence.shape[1], 1)
        
        emb_con = torch.cat((embedded_sentence, embedded_speaker), dim = 2)
        emb_con = emb_con.permute(1,0,2)
        output, hidden = self.rnn(emb_con)

        return hidden