class_docstr: A reversible version of tl.Serial (requires reversible sub-layers).
class_docstr_tok: ["A","reversible","version","of","tl.Serial","(","requires","reversible","sub-layers",")","."]
code: def __init__(self, *layers):
      super().__init__(*layers)
      # def __init__(self, *layers):  # pylint: disable=super-init-not-called
      #   cb.Serial.__init__(self, layers)
  
      # Note that sublayers has already been flattened to remove nested lists.
      for i, layer in enumerate(self.sublayers):
          if not isinstance(layer, ReversibleLayer):
              raise ValueError(
                  "Sub-layer {} of ReversibleSerial is not reversible: {}".format(
                      i, layer
                  )
              )
  
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 1 to create a new ReversibleSerial object from inherited base classes: ReversibleLayer, cb with example: obj = ReversibleSerial()