class_docstr: Abstract sequence model class.
  
  All models must adhere to this interface
  
  A SequenceModule is generally a model that transforms an input of shape
  (n_batch, l_sequence, d_model) to (n_batch, l_sequence, d_output)
  
  REQUIRED methods and attributes
  forward, d_model, d_output: controls standard forward pass,
  a sequence-to-sequence transformation
  __init__ should also satisfy the following interface;
  see SequenceIdentity for an example
      def __init__(self, d_model, transposed=False, **kwargs)
  
  OPTIONAL methods
  default_state, step: allows stepping the model recurrently with a hidden state
  state_to_tensor, d_state: allows decoding from hidden state
class_docstr_tok: ["Abstract","sequence","model","class",".","All","models","must","adhere","to","this","interface","A","SequenceModule","is","generally","a","model","that","transforms","an","input","of","shape","(","n_batch",",","l_sequence",",","d_model",")","to","(","n_batch",",","l_sequence",",","d_output",")","REQUIRED","methods","and","attributes","forward",",","d_model",",","d_output",":","controls","standard","forward","pass",",","a","sequence-to-sequence","transformation","__init__","should","also","satisfy","the","following","interface",";","see","SequenceIdentity","for","an","example","def","__init__","(","self",",","d_model",",","transposed=False",",","*","*","kwargs",")","OPTIONAL","methods","default_state",",","step",":","allows","stepping","the","model","recurrently","with","a","hidden","state","state_to_tensor",",","d_state",":","allows","decoding","from","hidden","state"]
docstr: Output dimension of model.
  
  This attribute is required for all SequenceModule instantiations.
  It is used by the rest of the pipeline
  (e.g. model backbone, decoder) to track the internal shapes of the full model.
docstr_tok: ["Output","dimension","of","model",".","This","attribute","is","required","for","all","SequenceModule","instantiations",".","It","is","used","by","the","rest","of","the","pipeline","(","e.g",".","model","backbone",",","decoder",")","to","track","the","internal","shapes","of","the","full","model","."]
code: def d_output(self):
      """Output dimension of model.
  
      This attribute is required for all SequenceModule instantiations.
      It is used by the rest of the pipeline
      (e.g. model backbone, decoder) to track the internal shapes of the full model.
      """
      if getattr(self, "_d_output", None) is None:
          raise NotImplementedError(
              "SequenceModule instantiation must specify d_output for decoder"
          )
      return self._d_output
  
file_path: espnet/espnet2/asr/state_spaces/base.py
imports: import functools
  from torch import nn
label_desc: Use image node_id 3 for calling the SequenceModule obj's underlying member method code with example usage: obj.d_output() and returns: self