def __init__(self, input_size, hidden_size, batch_size, bidirectional=True):
    super(Encoder, self).__init__()
    self.hidden_size = hidden_size
    self.input_size = input_size
    self.batch_size = batch_size
    self.bidirectional = bidirectional
    self.lstm = nn.LSTM(input_size, hidden_size, batch_first=False, bidirectional=bidirectional)
def __init__(self, input_size, hidden_size, batch_size, bidirectional=True):
    super(Encoder, self).__init__()
    self.hidden_size = hidden_size
    self.input_size = input_size
    self.batch_size = batch_size
    self.bidirectional = bidirectional
    self.lstm = nn.LSTM(input_size, hidden_size, batch_first=False, bidirectional=bidirectional)