code: def __init__(
      self,
      height: int,
      width: int,
      num_channels: int = None,
      patch_size: int = 16,
      embed_size: int = 512,
      token_size: int = 2048,
      channel_dim: int = 256,
      num_layers: int = 8,
      dropout: float = 0.0,
      avg_pool: bool = True,
      encoder_config=None,
      **kwargs,
  ):
      super().__init__()
      self.config = encoder_config
  
      logger.debug(f" {self.name}")
      # map parameter input feature config names to internal names
      img_height = height
      img_width = width
      in_channels = num_channels
  
      if num_channels is None:
          raise RuntimeError("num_channels must not be None")
  
      self._input_shape = (in_channels, img_height, img_width)
  
      logger.debug("  MLPMixer")
      self.mlp_mixer = MLPMixer(
          img_height=img_height,
          img_width=img_width,
          in_channels=in_channels,
          patch_size=patch_size,
          embed_size=embed_size,
          token_size=token_size,
          channel_dim=channel_dim,
          num_layers=num_layers,
          dropout=dropout,
          avg_pool=avg_pool,
      )
  
      self._output_shape = self.mlp_mixer.output_shape
  
imports: import logging
  from typing import Any, Dict, List, Optional, Tuple, Type, Union
  import torch
  from ludwig.api_annotations import DeveloperAPI
  from ludwig.constants import ENCODER_OUTPUT, IMAGE
  from ludwig.encoders.base import Encoder
  from ludwig.encoders.registry import register_encoder
  from ludwig.encoders.types import EncoderOutputDict
  from ludwig.modules.convolutional_modules import Conv2DStack, ResNet
  from ludwig.modules.fully_connected_modules import FCStack
  from ludwig.modules.mlp_mixer_modules import MLPMixer
  from ludwig.schema.encoders.image.base import ImageEncoderConfig, MLPMixerConfig, ResNetConfig, Stacked2DCNNConfig, ViTConfig
  from ludwig.utils.torch_utils import FreezeModule
label_desc: Use image node_id 1 to create a new MLPMixerEncoder object from inherited base classes: ImageEncoder with example: obj = MLPMixerEncoder(height, width, num_channels, patch_size, embed_size, token_size, channel_dim, num_layers, dropout, avg_pool, encoder_config)