speechbrain.lobes.models.VanillaNN module

Vanilla Neural Network for simple tests.

Authors * Elena Rastorgueva 2020

Summary

Classes:

VanillaNN

A simple vanilla Deep Neural Network.

Reference

class speechbrain.lobes.models.VanillaNN.VanillaNN(input_shape, activation=<class 'torch.nn.modules.activation.LeakyReLU'>, dnn_blocks=2, dnn_neurons=512)[source]

Bases: speechbrain.nnet.containers.Sequential

A simple vanilla Deep Neural Network.

Parameters
  • activation (torch class) – A class used for constructing the activation layers.

  • dnn_blocks (int) – The number of linear neural blocks to include.

  • dnn_neurons (int) – The number of neurons in the linear layers.

Example

>>> inputs = torch.rand([10, 120, 60])
>>> model = VanillaNN(input_shape=inputs.shape)
>>> outputs = model(inputs)
>>> outputs.shape
torch.Size([10, 120, 512])