class_docstr: Stack of pooling and convolutional blocks with residual connections.
class_docstr_tok: ["Stack","of","pooling","and","convolutional","blocks","with","residual","connections","."]
code: def __call__(self, x):
      # We need to reset the list otherwise it would have the previous values each
      # time we create a new network.
      if self.is_initializing():
          for _ in range(len(self.layer_names)):
              self.layer_names.pop()
      initializer = nn.initializers.xavier_uniform()
      layer = nn.Conv(
          features=self.num_ch,
          kernel_size=(3, 3),
          strides=1,
          kernel_init=initializer,
          padding="SAME",
      )
      conv_out = layer(x)
      conv_out = nn.max_pool(
          conv_out, window_shape=(3, 3), padding="SAME", strides=(2, 2)
      )
      for _ in range(self.num_blocks):
          block_input = conv_out
          conv_out = nn.relu(conv_out)
          conv_out = self._record_activations(conv_out, layer)
          layer = nn.Conv(
              features=self.num_ch,
              kernel_size=(3, 3),
              strides=1,
              padding="SAME",
          )
          conv_out = layer(conv_out)
          conv_out = nn.relu(conv_out)
          conv_out = self._record_activations(conv_out, layer)
          layer = nn.Conv(
              features=self.num_ch,
              kernel_size=(3, 3),
              strides=1,
              padding="SAME",
          )
          conv_out = layer(conv_out)
          conv_out += block_input
      return conv_out
  
imports: import math
  from dopamine.discrete_domains import atari_lib
  from flax import linen
  import gin
  import jax.numpy
label_desc: Use image node_id 2 for calling the Stack obj's underlying member method code with example usage: obj.__call__(x) and returns: conv_out