code: def __init__(self, nin, nclass, scales, filters, filters_max):
      def nl(x):
          """Return tanh as activation function. Tanh has better utility for
          differentially private SGD https://arxiv.org/abs/2007.14191 .
          """
          return tanh(x)
  
      def nf(scale):
          return min(filters_max, filters << scale)
  
      ops = [Conv2D(nin, nf(0), 3), nl]
      for i in range(scales):
          ops.extend(
              [
                  Conv2D(nf(i), nf(i), 3),
                  nl,
                  Conv2D(nf(i), nf(i + 1), 3),
                  nl,
                  partial(average_pool_2d, size=2, strides=2),
              ]
          )
      ops.extend(
          [Conv2D(nf(scales), nclass, 3), lambda x: x.mean((2, 3))]
      )
      super().__init__(ops)
  
file_path: objax/examples/image_classification/mnist_dp.py
imports: import argparse
  import os
  from functools import partial
  import numpy
  import tensorflow_datasets
  from tqdm import trange
  import objax
  from objax.functional import one_hot, tanh, average_pool_2d
  from objax.jaxboard import SummaryWriter, Summary
  from objax.nn import Sequential, Conv2D
  from objax.util import EasyDict
label_desc: Use image node_id 1 to create a new ALLCNN object from inherited base classes: Sequential with example: obj = ALLCNN(nin, nclass, scales, filters, filters_max)