def __init__(self, vocab_size, emb_dim, emb, hidden_dim, nlayers, pad_token, bidir=False):
    super(EncoderGRU, self).__init__()
    self.hidden_dim = hidden_dim
    self.emb_dim = (emb_dim + (dimWPE * 2))
    self.nlayers = nlayers
    self.bidir = bidir
    self.gru = nn.GRU(((self.emb_dim // 2) if bidir else self.emb_dim), self.hidden_dim, self.nlayers, bidirectional=bidir, batch_first=True)
def __init__(self, vocab_size, emb_dim, emb, hidden_dim, nlayers, pad_token, bidir=False):
    super(EncoderGRU, self).__init__()
    self.hidden_dim = hidden_dim
    self.emb_dim = (emb_dim + (dimWPE * 2))
    self.nlayers = nlayers
    self.bidir = bidir
    self.gru = nn.GRU(((self.emb_dim // 2) if bidir else self.emb_dim), self.hidden_dim, self.nlayers, bidirectional=bidir, batch_first=True)