MLP
lamp.nn.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
Attributes
- Graph
-
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
MLP.type
Members list
Type members
Classlikes
case object Gelu extends ActivationFunction
Attributes
- Supertypes
-
trait Singletontrait Producttrait Mirrortrait Serializabletrait Producttrait Equalstrait ActivationFunctionclass Objecttrait Matchableclass AnyShow all
- Self type
-
Gelu.type
case object HardSwish extends ActivationFunction
Attributes
- Supertypes
-
trait Singletontrait Producttrait Mirrortrait Serializabletrait Producttrait Equalstrait ActivationFunctionclass Objecttrait Matchableclass AnyShow all
- Self type
-
HardSwish.type
object NormType
case object Relu extends ActivationFunction
Attributes
- Supertypes
-
trait Singletontrait Producttrait Mirrortrait Serializabletrait Producttrait Equalstrait ActivationFunctionclass Objecttrait Matchableclass AnyShow all
- Self type
-
Relu.type
case object Sigmoid extends ActivationFunction
Attributes
- Supertypes
-
trait Singletontrait Producttrait Mirrortrait Serializabletrait Producttrait Equalstrait ActivationFunctionclass Objecttrait Matchableclass AnyShow all
- Self type
-
Sigmoid.type
case object Swish1 extends ActivationFunction
Attributes
- Supertypes
-
trait Singletontrait Producttrait Mirrortrait Serializabletrait Producttrait Equalstrait ActivationFunctionclass Objecttrait Matchableclass AnyShow all
- Self type
-
Swish1.type
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]]]]]
In this article