code: def __init__(
      self,
      kernel_size,
      stride,
      padding,
      pooling_kernel_size=3,
      pooling_stride=2,
      pooling_padding=1,
      n_conv_layers=1,
      n_input_channels=3,
      n_output_channels=64,
      in_planes=64,
      activation=None,
      max_pool=True,
      conv_bias=False,
  ):
      super().__init__()
  
      n_filter_list = (
          [n_input_channels]
          + [in_planes for _ in range(n_conv_layers - 1)]
          + [n_output_channels]
      )
  
      n_filter_list_pairs = zip(n_filter_list[:-1], n_filter_list[1:])
  
      self.conv_layers = nn.Sequential(
          *[
              nn.Sequential(
                  nn.Conv2d(
                      chan_in,
                      chan_out,
                      kernel_size=(kernel_size, kernel_size),
                      stride=(stride, stride),
                      padding=(padding, padding),
                      bias=conv_bias,
                  ),
                  nn.Identity()
                  if not exists(activation)
                  else activation(),
                  nn.MaxPool2d(
                      kernel_size=pooling_kernel_size,
                      stride=pooling_stride,
                      padding=pooling_padding,
                  )
                  if max_pool
                  else nn.Identity(),
              )
              for chan_in, chan_out in n_filter_list_pairs
          ]
      )
  
      self.apply(self.init_weight)
  
imports: import torch
  from torch import nn, einsum
  import torch.nn.functional
  from einops import rearrange, repeat
label_desc: Use image node_id 1 to create a new Tokenizer object from inherited base classes: nn with example: obj = Tokenizer(kernel_size, stride, padding, pooling_kernel_size, pooling_stride, pooling_padding, n_conv_layers, n_input_channels, n_output_channels, in_planes, activation, max_pool, conv_bias)