class_docstr: Encodes queries via the last hidden state of a uni-directional LSTM.
  
  Parameters
  ----------
  input_size: The number of features of the time series.
  hidden_size: The size of hidden states of LSTM, corresponds to encoding size of the queries,
      i.e. the encoder returns a tensor with shape [batch, hidden_size].
  num_layers: number of layers of the LSTM.
class_docstr_tok: ["Encodes","queries","via","the","last","hidden","state","of","a","uni-directional","LSTM",".","Parameters","--","--","--","--","--","input_size",":","The","number","of","features","of","the","time","series",".","hidden_size",":","The","size","of","hidden","states","of","LSTM",",","corresponds","to","encoding","size","of","the","queries",",","i.e",".","the","encoder","returns","a","tensor","with","shape","[","batch",",","hidden_size","]",".","num_layers",":","number","of","layers","of","the","LSTM","."]
code: def __init__(
      self, input_size: int, hidden_size: int, num_layers: int
  ):
      super().__init__()
      self.encoder = nn.LSTM(
          input_size=input_size,
          hidden_size=hidden_size,
          num_layers=num_layers,
          bidirectional=False,
          batch_first=True,
      )
  
file_path: gluonts/src/gluonts/nursery/few_shot_prediction/src/meta/models/EcDc/components/query.py
imports: from abc import ABC, abstractmethod
  import torch
  from torch import nn
  from torch.nn.utils.rnn import pack_padded_sequence
  from meta.data.batch import SeriesBatch
  from .tcn import CausalCNNEncoder
label_desc: Use image node_id 1 to create a new LSTMQueryEncoder object from inherited base classes: QueryEncoder with example: obj = LSTMQueryEncoder(input_size, hidden_size, num_layers)