Introduction

Tutorials

Developer guide

API Reference

private mlpmixerfunction

mlpmixer(block, imsize::Dims{2} = (224, 224); inchannels = 3, norm_layer = LayerNorm,
         patch_size::Dims{2} = (16, 16), embedplanes = 512, drop_path_rate = 0.,
         depth = 12, nclasses = 1000, kwargs...)

Creates a model with the MLPMixer architecture. (reference).

Arguments

  • block: the type of mixer block to use in the model - architecture dependent (a constructor of the form block(embedplanes, npatches; drop_path_rate, kwargs...))
  • imsize: the size of the input image
  • inchannels: the number of input channels
  • norm_layer: the normalization layer to use in the model
  • patch_size: the size of the patches
  • embedplanes: the number of channels after the patch embedding (denotes the hidden dimension)
  • drop_path_rate: Stochastic depth rate
  • depth: the number of blocks in the model
  • nclasses: number of output classes
  • kwargs: additional arguments (if any) to pass to the mixer block. Will use the defaults if not specified.