7.1 Built-in modules

What are modules?
  • an object that encapsulates state
  • can be of any complexity (e.g. layer, or models consisting of layers)

Examples of {torch} modules:

  • linear: nn_linear()
  • convolutional: nn_conf1d(), nn_conf2d(), nn_conv_3d()
  • recurrent: nn_lstm(), nn_gru()
  • embedding: nn_embedding()
  • multi-head attention: nn_multihead_attention()
  • See torch documentation for others