code: def __init__(
      self, nin, nclass, scales, filters, filters_max, **kwargs
  ):
      del kwargs
  
      def nf(scale):
          return min(filters_max, filters << scale)
  
      ops = [
          objax.nn.Conv2D(nin, nf(0), 3),
          objax.functional.leaky_relu,
      ]
      for i in range(scales):
          ops.extend(
              [
                  objax.nn.Conv2D(nf(i), nf(i), 3),
                  objax.functional.leaky_relu,
                  objax.nn.Conv2D(nf(i), nf(i + 1), 3),
                  objax.functional.leaky_relu,
                  functools.partial(
                      objax.functional.average_pool_2d,
                      size=2,
                      strides=2,
                  ),
              ]
          )
      ops.extend(
          [objax.nn.Conv2D(nf(scales), nclass, 3), self._mean_reduce]
      )
      super().__init__(ops)
  
file_path: objax/examples/fixmatch/libml/zoo/convnet.py
imports: import functools
  import jax
  import objax
  from objax.typing import JaxArray
label_desc: Use image node_id 2 to create a new ConvNet object from inherited base classes: objax.nn with example: obj = ConvNet(nin, nclass, scales, filters, filters_max)