class_docstr: Reversible reshaping layer.
class_docstr_tok: ["Reversible","reshaping","layer","."]
code: def reverse(
      self, outputs, weights=(), state=(), new_state=(), rng=None
  ):
      del state, new_state, rng, weights
      if not isinstance(outputs, (tuple, list)):
          outputs = (outputs,)
      res = []
      for x in outputs:
          new_shape = self._shape1 + list(x.shape)[len(self._shape2) :]
          res.append(fastmath.numpy.reshape(x, new_shape))
      if len(res) == 1:
          return res[0]
      return tuple(res)
  
imports: from absl import logging
  import jax
  from trax import fastmath
  from trax.layers import base
  from trax.layers import combinators
label_desc: Use image node_id 3 for calling the ReversibleReshape obj's underlying member method code with example usage: obj.reverse(outputs, weights, state, new_state, rng) and returns: tuple, res