Introduction

Tutorials

Developer guide

API Reference

public mlp_blockfunction

mlp_block(inplanes::Integer, hidden_planes::Integer, outplanes::Integer = inplanes; 
          dropout = 0., activation = gelu)

Feedforward block used in many MLPMixer-like and vision-transformer models.

Arguments

  • inplanes: Number of dimensions in the input.
  • hidden_planes: Number of dimensions in the intermediate layer.
  • outplanes: Number of dimensions in the output - by default it is the same as inplanes.
  • dropout: Dropout rate.
  • activation: Activation function to use.