A class representing a single layer within a neural network.
More...
#include <Layer.h>
|
| AZ_TYPE_INFO (Layer, "{FB91E0A7-86C0-4431-83A8-04F8D8E1C9E2}") |
|
| Layer (Layer &&)=default |
|
| Layer (const Layer &)=default |
|
| Layer (ActivationFunctions activationFunction, AZStd::size_t activationDimensionality, AZStd::size_t layerDimensionality) |
|
Layer & | operator= (Layer &&)=default |
|
Layer & | operator= (const Layer &)=default |
|
const AZ::VectorN & | Forward (LayerInferenceData &inferenceData, const AZ::VectorN &activations) |
| Performs a basic forward pass on this layer, outputs are stored in m_output.
|
|
void | AccumulateGradients (AZStd::size_t samples, LayerTrainingData &trainingData, LayerInferenceData &inferenceData, const AZ::VectorN &expected) |
|
void | ApplyGradients (LayerTrainingData &trainingData, float learningRate) |
| Applies the current gradient values to the layers weights and biases and resets the gradient values for a new accumulation pass.
|
|
bool | Serialize (AzNetworking::ISerializer &serializer) |
|
AZStd::size_t | EstimateSerializeSize () const |
| Returns the estimated size required to serialize this layer.
|
|
void | OnSizesChanged () |
| Updates layer internals for it's requested dimensionalities.
|
|
|
static void | Reflect (AZ::ReflectContext *context) |
|
|
AZStd::size_t | m_inputSize = 0 |
|
AZStd::size_t | m_outputSize = 0 |
|
AZ::MatrixMxN | m_weights |
|
AZ::VectorN | m_biases |
|
ActivationFunctions | m_activationFunction = ActivationFunctions::ReLU |
|
A class representing a single layer within a neural network.
◆ AccumulateGradients()
Performs a gradient computation against the provided expected output using the provided gradients from the previous layer. This method presumes that we've completed a forward pass immediately prior to fill all the relevant vectors
◆ Reflect()
static void MachineLearning::Layer::Reflect |
( |
AZ::ReflectContext * |
context | ) |
|
|
static |
AzCore Reflection.
- Parameters
-
context | reflection context |
◆ Serialize()
bool MachineLearning::Layer::Serialize |
( |
AzNetworking::ISerializer & |
serializer | ) |
|
Base serialize method for all serializable structures or classes to implement.
- Parameters
-
serializer | ISerializer instance to use for serialization |
- Returns
- boolean true for success, false for serialization failure
The documentation for this class was generated from the following file:
- Gems/MachineLearning/Code/Source/Models/Layer.h