Skip to main content

LayerType

C++: phynexis::ml::LayerType
Python: phynexis.ml.LayerType
Header: src/ml/neural_net.hpp

Description

Enumeration of layer types for NeuralNet.add_layer().

Values

ValueDescription
IdentityIdentity layer (no-op)
LinearFully connected linear layer
ReLUReLU activation
LeakyReLULeaky ReLU activation
ELUExponential linear unit
TanhHyperbolic tangent activation
SoftmaxSoftmax activation
LogSoftMaxLog-softmax activation

Example

import phynexis

net = phynexis.ml.NeuralNet()
net.add_layer(phynexis.ml.LayerType.Linear, 64)
net.add_layer(phynexis.ml.LayerType.ReLU)
net.add_layer(phynexis.ml.LayerType.Linear, 1)