Introduction

Tutorials

Developer guide

API Reference

private mixerblockfunction

mixerblock(planes, npatches; mlp_ratio = (0.5, 4.0), mlp_layer = mlp_block, 
           dropout = 0., drop_path_rate = 0., activation = gelu)

Creates a feedforward block for the MLPMixer architecture. (reference)

Arguments:

  • planes: the number of planes in the block
  • npatches: the number of patches of the input
  • mlp_ratio: number(s) that determine(s) the number of hidden channels in the token mixing MLP and/or the channel mixing MLP as a ratio to the number of planes in the block.
  • mlp_layer: the MLP layer to use in the block
  • dropout: the dropout rate to use in the MLP blocks
  • drop_path_rate: Stochastic depth rate
  • activation: the activation function to use in the MLP blocks