5 #include "ActivationTypes.h"
36 SMARTENGINE_ENUM_STRING(
LayerType,
"LinearNoBias",
"Linear",
"LSTM");
153 SMARTENGINE_EXPORT ObjPtr NeuronLayer_CreateInstance(
const NeuronLayerCInfo& cinfo);
154 SMARTENGINE_EXPORT ObjPtr NeuronLayer_InstanceLayer(ObjPtr
object,
const char* name, ObjPtr input);
155 SMARTENGINE_EXPORT
void NeuronLayer_SetRandomWeights(ObjPtr
object);
156 SMARTENGINE_EXPORT
void NeuronLayer_Reset(ObjPtr
object);
157 SMARTENGINE_EXPORT
void NeuronLayer_Step(ObjPtr
object);
A logical node in the AI graph. Some nodes, like NeuralNetwork, are composed of other nodes (neuron l...
Definition: GraphNode.h:34
virtual void Step()=0
Steps the internal state. Should be after execution of the layer and before new data is put into the ...
LayerInfo layerInfo
Layer specification and details
Definition: NeuronLayer.h:98
Base class for objects that can be loaded from and saved to an in memory buffer.
Definition: Resource.h:54
virtual ObjectPtr< INeuronLayer > InstanceLayer(const char *name, IGraphNode *input)=0
Creates a new INeuronLayer with a different input, but weights shared with this layer.
IGraphNode * input
Input into this layer. When deserializing the layer, the dimension of this input must be equal to the...
Definition: NeuronLayer.h:86
int neuronCount
Number of neurons in the layer. This is the output channel count in Conv2D layers.
Definition: NeuronLayer.h:51
SMARTENGINE_EXPORT ObjectPtr< INeuronLayer > CreateNeuronLayer(const NeuronLayerCInfo &cinfo)
Creates an instance of INeuronLayer
Data used to construct an IGraphNode instance
Definition: GraphNode.h:17
LayerType type
Layer type
Definition: NeuronLayer.h:46
virtual void SetRandomWeights()=0
Initialize the weights of the layer to random values.
Data used to construct an INeuronLayer instance
Definition: NeuronLayer.h:81
bool staticInstance
If true, this node will not be instanced, but rather referenced directly when instancing the graph it...
Definition: NeuronLayer.h:93
Smart pointer to an IObject. Automatic ref counting.
Definition: ObjectPtr.h:16
@ LinearNoBias
Linear with no bias (X * W)
Definition: A2CTrainer.h:10
LayerType
The type of layer to create
Definition: NeuronLayer.h:18
ActivationType
The activation function to apply to the output of the NeuronLayer
Definition: ActivationTypes.h:14
ActivationType activationType
Activation type
Definition: NeuronLayer.h:56
bool operator==(const LayerInfo &rhs)
Definition: NeuronLayer.h:63
A neuron layer is the trainable unit in the neural network graph. These can chained together to allow...
Definition: NeuronLayer.h:107
bool operator!=(const LayerInfo &rhs)
Definition: NeuronLayer.h:74
virtual void Reset()=0
Resets the internal state. Should be called periodically on layers that need stepping (LSTM)....
Layer information
Definition: NeuronLayer.h:42
float weightStandardDeviation
The standard deviation applied when randomizing the weights
Definition: NeuronLayer.h:61