class_docstr: Base class for query encoders.
class_docstr_tok: ["Base","class","for","query","encoders","."]
docstr: Encodes each query with a vector of fixed size.
  
  Parameters
  ----------
  query:
      A SeriesBatch containing sequences of size [batch, sequence length, n_features].
  
  Returns
  -------
  SeriesBatch:
      The transformed batch containing sequences with the encoded queries
      of size [batch, encoding size].
docstr_tok: ["Encodes","each","query","with","a","vector","of","fixed","size",".","Parameters","--","--","--","--","--","query",":","A","SeriesBatch","containing","sequences","of","size","[","batch",",","sequence","length",",","n_features","]",".","Returns","--","--","--","-","SeriesBatch",":","The","transformed","batch","containing","sequences","with","the","encoded","queries","of","size","[","batch",",","encoding","size","]","."]
code: def forward(self, query: SeriesBatch) -> SeriesBatch:
      """
      Encodes each query with a vector of fixed size.
  
      Parameters
      ----------
      query:
          A SeriesBatch containing sequences of size [batch, sequence length, n_features].
  
      Returns
      -------
      SeriesBatch:
          The transformed batch containing sequences with the encoded queries
          of size [batch, encoding 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 for calling the QueryEncoder obj's underlying member method code with example usage: obj.forward(query) without return types