class_docstr: Block of reversible layers. See rev_block.
class_docstr_tok: ["Block","of","reversible","layers",".","See","rev_block","."]
code: def __init__(
      self,
      f,
      g,
      num_layers=1,
      f_side_input=None,
      g_side_input=None,
      use_efficient_backprop=True,
      name="revblock",
      **kwargs,
  ):
      super(RevBlock, self).__init__(name=name, **kwargs)
  
      if isinstance(f, list):
          assert len(f) == num_layers
      else:
          f = [f] * num_layers
  
      if isinstance(g, list):
          assert len(g) == num_layers
      else:
          g = [g] * num_layers
  
      f = [
          _scope_wrap(fn, "revlayer_%d/f" % i) for i, fn in enumerate(f)
      ]
      g = [
          _scope_wrap(fn, "revlayer_%d/g" % i) for i, fn in enumerate(g)
      ]
  
      self.f = f
      self.g = g
  
      self.num_layers = num_layers
      self.f_side_input = f_side_input or []
      self.g_side_input = g_side_input or []
  
      self._use_efficient_backprop = use_efficient_backprop
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import functools
  import re
  import numpy
  import six
  from six.moves import xrange
  from ..None import contrib_framework
  from tensorflow.python.eager import backprop
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import ops
  from tensorflow.python.layers import base
  from tensorflow.python.ops import array_ops
  from tensorflow.python.ops import control_flow_ops
  from tensorflow.python.ops import control_flow_util
  from tensorflow.python.ops import custom_gradient
  from tensorflow.python.ops import gradients_impl
  from tensorflow.python.ops import math_ops
  from tensorflow.python.ops import variable_scope
  from tensorflow.python.ops import variables
  from tensorflow.python.platform import tf_logging
  from tensorflow.python.util import nest
  from tensorflow.python.util import tf_inspect
label_desc: Use image node_id 1 to create a new RevBlock object from inherited base classes: base with example: obj = RevBlock(f, g, num_layers, f_side_input, g_side_input, use_efficient_backprop, name)