MLP
object MLP
Factory for multilayer fully connected feed forward networks
Returned network has the following repeated structure: [linear -> batchnorm -> nonlinearity -> dropout]*
The last block does not include the nonlinearity and the dropout.
- Value parameters:
- dropout
dropout applied to each block
- hidden
list of hidden dimensions
- in
input dimensions
- out
output dimensions
Type members
Classlikes
Value members
Concrete methods
def apply[S : Sc](in: Int, out: Int, hidden: Seq[Int], tOpt: STenOptions, dropout: Double, lastNonLinearity: Boolean, activationFunction: ActivationFunction, norm: NormType, numHeads: Int): Seq2[Variable, Variable, Variable, Sequential[Variable, Seq4[Variable, Variable, Variable, Variable, Variable, Linear, Sequential[Variable, EitherModule[Variable, Variable, BatchNorm, LayerNorm]], Fun, Dropout]], EitherModule[Variable, Variable, Seq4[Variable, Variable, Variable, Variable, Variable, Linear, Sequential[Variable, EitherModule[Variable, Variable, BatchNorm, LayerNorm]], Fun, Dropout], Seq2[Variable, Variable, Variable, Linear, Sequential[Variable, EitherModule[Variable, Variable, BatchNorm, LayerNorm]]]]]