code: def __init__(
      self,
      nin: int,
      nclass: int,
      scales: int,
      filters: int,
      repeat: int,
      dropout: int = 0,
      bn: Callable = objax.nn.BatchNorm2D,
      **kwargs,
  ):
      del kwargs
      n = 16
      ops = [objax.nn.Conv2D(nin, n, 3, **conv_args(3, n))]
      for scale in range(scales):
          last_n, n = n, filters << scale
          ops.append(
              ResNetBlock(
                  last_n,
                  n,
                  stride=2 if scale else 1,
                  activate_before_residual=scale == 0,
                  bn=bn,
              )
          )
          ops.extend(
              [ResNetBlock(n, n, bn=bn) for _ in range(repeat - 1)]
          )
      ops.extend(
          [
              bn(n, momentum=0.999),
              leaky_relu,
              self.mean_reduce,
              objax.nn.Dropout(1 - dropout),
              objax.nn.Linear(
                  n,
                  nclass,
                  w_init=objax.nn.init.xavier_truncated_normal,
              ),
          ]
      )
      super().__init__(ops)
  
file_path: objax/examples/fixmatch/libml/zoo/resnet.py
imports: import functools
  from typing import Callable
  import jax
  import objax
  from objax.typing import JaxArray
label_desc: Use image node_id 2 to create a new ResNet object from inherited base classes: objax.nn with example: obj = ResNet(nin, nclass, scales, filters, repeat, dropout, bn)