class_docstr: Strips out the leading encoder tokens from the concatenated array.
class_docstr_tok: ["Strips","out","the","leading","encoder","tokens","from","the","concatenated","array","."]
code: def forward(self, inputs):
      vec_ed, tok_e, tok_d = inputs
  
      # In training/eval mode or at the first step predict mode i.e. when
      # state.shape is (), i.e. at first step, we do the actual compuration
      if self._mode != "predict" or not self.state.shape:
          # Now state.shape will not evaluate to false.
          self.state = self.state.reshape((1,))
          return _StripFromConcatenateWithPadding(vec_ed, tok_e, tok_d)
  
      # In predict mode and on subsequent steps (i.e. after the first step) vec_ed
      # is actually vec_d, since no concatenation happened at all.
      return vec_ed
  
imports: from trax import fastmath
  from trax import layers
  from trax.fastmath import numpy
  from trax.models.research import configurable_transformer
label_desc: Use image node_id 3 for calling the StripFromConcatenateWithPadding obj's underlying member method code with example usage: obj.forward(inputs) and returns: vec_ed, _StripFromConcatenateWithPadding