SmartEngine  1.6.0
Classes | Public Member Functions | List of all members
SmartEngine.NeuralNetworks.NeuronLayer Class Reference

A neuron layer is the trainable unit in the neural network graph. These can chained together to allow the network to learn and represent complex relationships. More...

Inheritance diagram for SmartEngine.NeuralNetworks.NeuronLayer:
SmartEngine.NeuralNetworks.GraphNode SmartEngine.ISerializable SmartEngine.Object SmartEngine.Disposable

Classes

class  CInfo
 

Public Member Functions

 NeuronLayer (CInfo cinfo)
 
NeuronLayer InstanceLayer (string name, GraphNode input)
 Creates a new NeuronLayer with a different input, but weights shared with this layer. More...
 
void SetRandomWeights ()
 Initialize the weights of the layer to random values. More...
 
void Reset ()
 Resets the internal state. Should be called periodically on layers that need stepping (LSTM). The period to call this is defined by the sequence length used to train the layer. More...
 
void Step ()
 Steps the internal state. Should be after execution of the layer and before new data is put into the layer. Only required to be called for layers that need stepping (LSTM). More...
 
unsafe SerializationResult Serialize (MemoryBuffer buffer)
 Saves the data store to a buffer. More...
 
SerializationResult Deserialize (MemoryBuffer buffer)
 Loads the data store and population from a buffer. More...
 
- Public Member Functions inherited from SmartEngine.NeuralNetworks.GraphNode
Matrix Execute ()
 Synchronously execute the graph. The returned matrix is read-only. More...
 
IEnumerator RetrieveOutputAsync ()
 Asynchronously execute the graph. The output of the graph can be retrieved with the LastExecutionResult property when the returned enumerator completes. More...
 
- Public Member Functions inherited from SmartEngine.Object
void AddRef ()
 Increments the internal reference count on this object. It is not common to use this method directly. More...
 
void Release ()
 Decrements the internal reference count on this object. It is not common to use this method directly. More...
 
- Public Member Functions inherited from SmartEngine.Disposable
void Dispose ()
 Cleans up any internal state. It is not safe to use an object after it has been disposed. More...
 

Additional Inherited Members

- Properties inherited from SmartEngine.NeuralNetworks.GraphNode
string Name [get]
 Returns the name of the graph node. More...
 
Matrix LastExecutionResult [get]
 Get the results of last execution of the graph. The returned matrix is read-only. More...
 
int OutputDimension [get]
 Returns the dimension of a single row of this node's output. The Output property's length will be a multiple of this value. More...
 

Detailed Description

A neuron layer is the trainable unit in the neural network graph. These can chained together to allow the network to learn and represent complex relationships.

Member Function Documentation

◆ Deserialize()

SerializationResult SmartEngine.NeuralNetworks.NeuronLayer.Deserialize ( MemoryBuffer  buffer)

Loads the data store and population from a buffer.

Parameters
data
Returns

Implements SmartEngine.ISerializable.

◆ InstanceLayer()

NeuronLayer SmartEngine.NeuralNetworks.NeuronLayer.InstanceLayer ( string  name,
GraphNode  input 
)

Creates a new NeuronLayer with a different input, but weights shared with this layer.

Parameters
nameThe name for the new layer.
inputThe input into the new layer.
Returns

◆ Reset()

void SmartEngine.NeuralNetworks.NeuronLayer.Reset ( )

Resets the internal state. Should be called periodically on layers that need stepping (LSTM). The period to call this is defined by the sequence length used to train the layer.

◆ Serialize()

unsafe SerializationResult SmartEngine.NeuralNetworks.NeuronLayer.Serialize ( MemoryBuffer  buffer)

Saves the data store to a buffer.

Parameters
outData
Returns

Implements SmartEngine.ISerializable.

◆ SetRandomWeights()

void SmartEngine.NeuralNetworks.NeuronLayer.SetRandomWeights ( )

Initialize the weights of the layer to random values.

◆ Step()

void SmartEngine.NeuralNetworks.NeuronLayer.Step ( )

Steps the internal state. Should be after execution of the layer and before new data is put into the layer. Only required to be called for layers that need stepping (LSTM).