class_docstr: CNN layer.
class_docstr_tok: ["CNN","layer","."]
code: def setup(self) -> None:
      super().setup()
  
      conv1_p = pax_fiddle.Config(
          convolutions.ConvBNAct,
          name="conv1",
          filter_shape=(self.kernel_size, self.kernel_size, 1, 32),
          filter_stride=(1, 1),
          batch_norm_tpl=None,
          activation_tpl=self.activation_tpl.clone(),
          bias=True,
      )
      self.create_child("conv1", conv1_p)
      pooling1_p = pax_fiddle.Config(
          poolings.Pooling,
          window_shape=(2, 2),
          window_stride=(2, 2),
          pooling_type="AVG",
      )
      self.create_child("pooling1", pooling1_p)
      conv2_p = pax_fiddle.Config(
          convolutions.ConvBNAct,
          name="conv2",
          filter_shape=(self.kernel_size, self.kernel_size, 32, 64),
          filter_stride=(1, 1),
          batch_norm_tpl=None,
          activation_tpl=self.activation_tpl.clone(),
          bias=True,
      )
      self.create_child("conv2", conv2_p)
      pooling2_p = pooling1_p.clone()
      self.create_child("pooling2", pooling2_p)
  
      dense_p = pax_fiddle.Config(
          linears.FeedForward,
          name="dense1",
          input_dims=4 * self.height * self.width,
          output_dims=256,
          has_bias=True,
          activation_tpl=self.activation_tpl.clone(),
      )
      linear_p = pax_fiddle.Config(
          linears.Linear,
          name="linear",
          input_dims=256,
          output_dims=self.num_classes,
      )
      bias_p = pax_fiddle.Config(
          linears.Bias, name="bias", dims=self.num_classes
      )
      self.create_children("dense", [dense_p, linear_p, bias_p])
  
imports: from typing import cast
  import jax
  import jax.numpy
  from paxml import base_experiment
  from paxml import base_task
  from paxml import experiment_registry
  from paxml import learners
  from paxml import tasks_lib
  from praxis import base_input
  from praxis import base_layer
  from praxis import base_model
  from praxis import optimizers
  from praxis import pax_fiddle
  from praxis import py_utils
  from praxis import pytypes
  from praxis import schedules
  from praxis.layers import activations
  from praxis.layers import convolutions
  from praxis.layers import linears
  from praxis.layers import poolings
  from pax_examples.dali_pax_input import MnistDaliInput
label_desc: Use image node_id 1 for calling the CNN obj's underlying member method code with example usage: obj.setup() without return types