class_docstr: Residual block of operations, e.g. convolutional or MLP.
class_docstr_tok: ["Residual","block","of","operations",",","e.g",".","convolutional","or","MLP","."]
code: def __init__(
      self,
      make_inner_op: MakeInnerOp,
      non_linearity: NonLinearity = jax.nn.relu,
      use_layer_norm: bool = False,
      name: str = "residual_block",
  ):
      super().__init__(name=name)
      self.inner_op1 = make_inner_op()
      self.inner_op2 = make_inner_op()
      self.non_linearity = non_linearity
      self.use_layer_norm = use_layer_norm
  
      if use_layer_norm:
          self.layernorm1 = hk.LayerNorm(
              axis=(-3, -2, -1),
              create_scale=True,
              create_offset=True,
              eps=1e-6,
          )
          self.layernorm2 = hk.LayerNorm(
              axis=(-3, -2, -1),
              create_scale=True,
              create_offset=True,
              eps=1e-6,
          )
  
file_path: acme/acme/jax/networks/resnet.py
imports: import enum
  import functools
  from typing import Callable, Sequence, Union
  import haiku
  import jax
  import jax.numpy
label_desc: Use image node_id 1 to create a new ResidualBlock object from inherited base classes: hk with example: obj = ResidualBlock(make_inner_op, non_linearity, use_layer_norm, name)