5 #include "ActivationTypes.h"
13 struct ConcatNodeCInfo : GraphNodeCInfo
69 SMARTENGINE_ENUM_STRING(
ChoiceType,
"Random",
"Max");
255 SMARTENGINE_EXPORT ObjPtr ConcatNode_CreateInstance(
const ConcatNodeCInfo& cinfo);
256 SMARTENGINE_EXPORT ObjPtr ExtractNode_CreateInstance(
const ExtractNodeCInfo& cinfo);
257 SMARTENGINE_EXPORT ObjPtr ChoiceNode_CreateInstance(
const ChoiceNodeCInfo& cinfo);
259 SMARTENGINE_EXPORT ObjPtr NormalNode_CreateInstance(
const NormalNodeCInfo& cinfo);
260 SMARTENGINE_EXPORT ObjPtr MinimumNode_CreateInstance(
const MinimumNodeCInfo& cinfo);
261 SMARTENGINE_EXPORT ObjPtr MaximumNode_CreateInstance(
const MaximumNodeCInfo& cinfo);
A logical node in the AI graph. Some nodes, like NeuralNetwork, are composed of other nodes (neuron l...
Definition: GraphNode.h:34
SMARTENGINE_EXPORT ObjectPtr< IGraphNode > CreateChoiceNode(const ChoiceNodeCInfo &cinfo)
Returns a random choice (as an integer) from the input node's probability distribution on each call t...
SMARTENGINE_EXPORT ObjectPtr< IGraphNode > CreateActivationNode(const ActivationNodeCInfo &cinfo)
Applies an activation function to the input.
IGraphNode *const * inputs
Array of node inputs
Definition: CommonNodes.h:21
SMARTENGINE_EXPORT ObjectPtr< IGraphNode > CreateExtractNode(const ExtractNodeCInfo &cinfo)
Extracts a subset of columns from the input node. The start index + column count must not exceed the ...
Data used to construct a stop gradient node instance
Definition: CommonNodes.h:162
IGraphNode * mean
Input node that represents the mean of the distribution
Definition: CommonNodes.h:117
IGraphNode * input
Node to choose from. This should have no activation applied when using a random decision algorithm.
Definition: CommonNodes.h:80
IGraphNode * B
'B' value to take minimum of
Definition: CommonNodes.h:139
SMARTENGINE_EXPORT ObjectPtr< IGraphNode > CreateConcatNode(const ConcatNodeCInfo &cinfo)
Merges two or more node streams into one. Each input stream must have the same number of rows....
@ Random
Treat the output as a probability distribution and sample from that distribution on each evaulation....
Data used to construct an activation node instance
Definition: CommonNodes.h:97
ChoiceType type
The decision algorithm to use.
Definition: CommonNodes.h:85
IGraphNode * input
The node to apply an activation on
Definition: CommonNodes.h:101
ChoiceType
Defines the descision algorithm of the ChoiceNode
Definition: CommonNodes.h:54
SMARTENGINE_EXPORT ObjectPtr< IGraphNode > CreateStopGradientNode(const StopGradientNodeCInfo &cinfo)
Stops the gradient from flowing backwards from this point. Only meaningful when training with gradien...
Data used to construct an IGraphNode instance
Definition: GraphNode.h:17
SMARTENGINE_EXPORT ObjectPtr< IGraphNode > CreateMinimumNode(const MinimumNodeCInfo &cinfo)
Takes the minimum of the inputs.
SMARTENGINE_EXPORT ObjectPtr< IGraphNode > CreateNormalNode(const NormalNodeCInfo &cinfo)
Returns a random value from the normal distribution given by the input nodes. NOTE: Input takes in th...
IGraphNode * A
'A' value to take minimum of.
Definition: CommonNodes.h:134
Data used to construct a choice node instance
Definition: CommonNodes.h:75
IGraphNode * B
'B' value to take maximum of
Definition: CommonNodes.h:155
int inputCount
The number of inputs to select between.
Definition: CommonNodes.h:188
IGraphNode *const * inputs
The inputs we will be selecting between.
Definition: CommonNodes.h:183
Smart pointer to an IObject. Automatic ref counting.
Definition: ObjectPtr.h:16
Data used to construct a maximum node instance
Definition: CommonNodes.h:146
IGraphNode * selector
Decides which input to pass through. Should have a dimension equal to the number of inputs.
Definition: CommonNodes.h:178
Definition: A2CTrainer.h:10
Data used to construct a concat node instance
Definition: CommonNodes.h:17
int axis
Axis to take choices from. 0 = row, 1 = column
Definition: CommonNodes.h:90
ActivationType type
The type of activation function to apply
Definition: CommonNodes.h:106
SMARTENGINE_EXPORT ObjectPtr< IGraphNode > CreateMultiplexerNode(const MultiplexerNodeCInfo &cinfo)
Uses the value from the selector to decide which of the inputs to pass through. The selected input wi...
ActivationType
The activation function to apply to the output of the NeuronLayer
Definition: ActivationTypes.h:14
Data used to construct a multiplexer node instance.
Definition: CommonNodes.h:173
ChoiceType selectionMethod
Method used to determine which output to select
Definition: CommonNodes.h:193
Data used to construct a minimum node instance
Definition: CommonNodes.h:130
IGraphNode * A
'A' value to take maximum of.
Definition: CommonNodes.h:150
SMARTENGINE_EXPORT ObjectPtr< IGraphNode > CreateMaximumNode(const MaximumNodeCInfo &cinfo)
Takes the maximum of the inputs.
IGraphNode * input
This input is passed through directly to the output of this node.
Definition: CommonNodes.h:166
IGraphNode * variance
Input node that represents the log of the variance. This should have no activation applied.
Definition: CommonNodes.h:123
Data used to construct a normal node instance
Definition: CommonNodes.h:113
int inputCount
Node input array count
Definition: CommonNodes.h:26