class_docstr: Encodes queries via the last output of a WaveNet.
  
  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","output","of","a","WaveNet",".","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,
      encoder: nn.Module = None,
      num_channels: int = 64,
      num_layers: int = 5,
      kernel_size: int = 2,
  ):
      super().__init__()
      if encoder:
          self.encoder = encoder
      else:
          self.encoder = CausalCNNEncoder(
              in_channels=1,
              channels=num_channels,
              depth=num_layers,
              out_channels=num_channels,
              kernel_size=kernel_size,
          )
  
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 TcnQueryEncoder object from inherited base classes: QueryEncoder with example: obj = TcnQueryEncoder(encoder, num_channels, num_layers, kernel_size)