![]() |
Neuron Net
|
Class of convolution layer GPU calculation. More...
Public Member Functions | |
| CNeuronConvOCL (void) | |
| Constructor. More... | |
| ~CNeuronConvOCL (void) | |
| Destructor. More... | |
| virtual bool | Init (uint numOutputs, uint myIndex, COpenCLMy *open_cl, uint window, uint step, uint window_out, uint units_count, ENUM_OPTIMIZATION optimization_type) |
| Method of initialization class. More... | |
| virtual bool | SetGradientIndex (int index) |
| Method for change index of gradient buffer. More... | |
| virtual bool | calcInputGradients (CNeuronBaseOCL *NeuronOCL) |
| Method to transfer gradients to previous layer. More... | |
| virtual int | Type (void) const |
| Identificator of class. More... | |
| virtual bool | Save (int const file_handle) |
| Save method. More... | |
| virtual bool | Load (int const file_handle) |
| Load method. More... | |
| virtual bool | Init (uint numOutputs, uint myIndex, COpenCLMy *open_cl, int window, int step, int units_count, ENUM_OPTIMIZATION optimization_type) |
| Method of initialization class. More... | |
| virtual bool | Init (uint numOutputs, uint myIndex, COpenCLMy *open_cl, uint numNeurons, ENUM_OPTIMIZATION optimization_type) |
| Method of initialization class. More... | |
| virtual void | SetActivationFunction (ENUM_ACTIVATION value) |
| Set the type of activation function (ENUM_ACTIVATION) More... | |
| virtual int | getOutputIndex (void) |
| Get index of output buffer. More... | |
| virtual int | getPrevOutIndex (void) |
| Get index of previous iteration output buffer. More... | |
| virtual int | getGradientIndex (void) |
| Get index of gradient buffer. More... | |
| virtual int | getWeightsIndex (void) |
| Get index of weights matrix buffer. More... | |
| virtual int | getDeltaWeightsIndex (void) |
| Get index of delta weights matrix buffer (SGD) More... | |
| virtual int | getFirstMomentumIndex (void) |
| Get index of first momentum matrix buffer (Adam) More... | |
| virtual int | getSecondMomentumIndex (void) |
| Get index of Second momentum matrix buffer (Adam) More... | |
| virtual int | getOutputVal (double &values[]) |
| Get values of output buffer. More... | |
| virtual int | getOutputVal (CArrayDouble *values) |
| Get values of output buffer. More... | |
| virtual int | getPrevVal (double &values[]) |
| Get values of previous iteration output buffer. More... | |
| virtual int | getGradient (double &values[]) |
| Get values of gradient buffer. More... | |
| virtual int | getWeights (double &values[]) |
| Get values of weights matrix buffer. More... | |
| virtual int | Neurons (void) |
| Get number of neurons in layer. More... | |
| virtual int | Activation (void) |
| Get type of activation function. More... | |
| virtual int | getConnections (void) |
| Get number of connections 1 neuron to next layer. More... | |
| virtual bool | FeedForward (CObject *SourceObject) |
| Dispatch method for defining the subroutine for feed forward process. More... | |
| virtual bool | calcHiddenGradients (CObject *TargetObject) |
| Dispatch method for defining the subroutine for transferring the gradient to the previous layer. More... | |
| virtual bool | calcHiddenGradients (CNeuronBaseOCL *NeuronOCL) |
| Method to transfer gradient to previous layer. More... | |
| virtual bool | calcOutputGradients (CArrayDouble *Target) |
| Method of output gradients calculation. More... | |
| virtual bool | UpdateInputWeights (CObject *SourceObject) |
| Dispatch method for defining the subroutine for updating weights. More... | |
Protected Member Functions | |
| virtual bool | feedForward (CNeuronBaseOCL *NeuronOCL) |
| Feed Forward method. More... | |
| virtual bool | updateInputWeights (CNeuronBaseOCL *NeuronOCL) |
| Method for updating weights. More... | |
Protected Attributes | |
| uint | iWindowOut |
| Size of out window. More... | |
| CBufferDouble * | WeightsConv |
| Matrix of weights to previous layer. More... | |
| CBufferDouble * | DeltaWeightsConv |
| Matrix of delta weights to previous layer (SGD) More... | |
| CBufferDouble * | FirstMomentumConv |
| Matrix of first momentum to previous layer (ADAM) More... | |
| CBufferDouble * | SecondMomentumConv |
| Matrix of second momentum to previous layer (ADAM) More... | |
| uint | iWindow |
| Input window size. More... | |
| uint | iStep |
| Size of step. More... | |
| COpenCLMy * | OpenCL |
| Object for working with OpenCL. More... | |
| CBufferDouble * | Output |
| Buffer of Output tenzor. More... | |
| CBufferDouble * | PrevOutput |
| Buffer of previous iteration Output tenzor. More... | |
| CBufferDouble * | Weights |
| Buffer of weights matrix. More... | |
| CBufferDouble * | DeltaWeights |
| Buffer of last delta weights matrix (SGD) More... | |
| CBufferDouble * | Gradient |
| Buffer of gradient tenzor. More... | |
| CBufferDouble * | FirstMomentum |
| Buffer of first momentum matrix (ADAM) More... | |
| CBufferDouble * | SecondMomentum |
| Buffer of second momentum matrix (ADAM) More... | |
| const double | alpha |
| Multiplier to momentum in SGD optimization. More... | |
| int | t |
| Count of iterations. More... | |
| int | m_myIndex |
| Index of neuron in layer. More... | |
| ENUM_ACTIVATION | activation |
| Activation type (ENUM_ACTIVATION) More... | |
| ENUM_OPTIMIZATION | optimization |
| Optimization method (ENUM_OPTIMIZATION) More... | |
Class of convolution layer GPU calculation.
Detailed description on the link.
Definition at line 3627 of file NeuroNet.mqh.
|
inline |
Constructor.
Definition at line 3641 of file NeuroNet.mqh.
| CNeuronConvOCL::~CNeuronConvOCL | ( | void | ) |
Destructor.
Definition at line 3657 of file NeuroNet.mqh.
|
inlinevirtualinherited |
Get type of activation function.
Definition at line 2966 of file NeuroNet.mqh.
|
virtualinherited |
Method to transfer gradient to previous layer.
| NeuronOCL | Pointer to next layer. |
Definition at line 3194 of file NeuroNet.mqh.
|
virtualinherited |
Dispatch method for defining the subroutine for transferring the gradient to the previous layer.
| TargetObject | Pointer to the next layer. |
Definition at line 3318 of file NeuroNet.mqh.
|
virtual |
Method to transfer gradients to previous layer.
| [in] | NeuronOCL | Pointer to previous layer. |
Reimplemented from CNeuronProofOCL.
Definition at line 3770 of file NeuroNet.mqh.
|
virtualinherited |
Method of output gradients calculation.
| Target | Traget value |
Definition at line 3227 of file NeuroNet.mqh.
|
protectedvirtual |
Feed Forward method.
| NeuronOCL | Pointer to previos layer. |
Reimplemented from CNeuronProofOCL.
Definition at line 3744 of file NeuroNet.mqh.
|
virtualinherited |
Dispatch method for defining the subroutine for feed forward process.
| SourceObject | Pointer to the previous layer. |
Definition at line 3141 of file NeuroNet.mqh.
|
inlinevirtualinherited |
Get number of connections 1 neuron to next layer.
Definition at line 2967 of file NeuroNet.mqh.
|
inlinevirtualinherited |
Get index of delta weights matrix buffer (SGD)
Definition at line 2956 of file NeuroNet.mqh.
|
inlinevirtualinherited |
Get index of first momentum matrix buffer (Adam)
Definition at line 2957 of file NeuroNet.mqh.
|
inlinevirtualinherited |
Get values of gradient buffer.
| [out] | values | Array of data |
Definition at line 2963 of file NeuroNet.mqh.
|
inlinevirtualinherited |
|
inlinevirtualinherited |
|
inlinevirtualinherited |
Get values of output buffer.
| [out] | values | Array of data |
Definition at line 2961 of file NeuroNet.mqh.
|
inlinevirtualinherited |
Get values of output buffer.
| [out] | values | Array of data |
Definition at line 2960 of file NeuroNet.mqh.
|
inlinevirtualinherited |
Get index of previous iteration output buffer.
Definition at line 2953 of file NeuroNet.mqh.
|
inlinevirtualinherited |
Get values of previous iteration output buffer.
| [out] | values | Array of data |
Definition at line 2962 of file NeuroNet.mqh.
|
inlinevirtualinherited |
Get index of Second momentum matrix buffer (Adam)
Definition at line 2958 of file NeuroNet.mqh.
|
inlinevirtualinherited |
Get values of weights matrix buffer.
| [out] | values | Array of data |
Definition at line 2964 of file NeuroNet.mqh.
|
inlinevirtualinherited |
|
virtualinherited |
Method of initialization class.
| [in] | numOutputs | Number of connections to next layer. |
| [in] | myIndex | Index of neuron in layer. |
| [in] | open_cl | Pointer to COpenCLMy object. |
| [in] | window | Size of input window |
| [in] | step | Step size. |
| [in] | units_countNumber | of neurons. |
| [in] | optimization_type | Optimization type (ENUM_OPTIMIZATION) |
Definition at line 3556 of file NeuroNet.mqh.
|
virtualinherited |
Method of initialization class.
| [in] | numOutputs | Number of connections to next layer. |
| [in] | myIndex | Index of neuron in layer. |
| [in] | open_cl | Pointer to COpenCLMy object. #param[in] numNeurons Number of neurons in layer |
| optimization_type | Optimization type (ENUM_OPTIMIZATION) |
Definition at line 3021 of file NeuroNet.mqh.
|
virtual |
Method of initialization class.
| [in] | numOutputs | Number of connections to next layer. |
| [in] | myIndex | Index of neuron in layer. |
| [in] | open_cl | Pointer to COpenCLMy object. |
| [in] | window | Size of input window |
| [in] | step | Step size. |
| [in] | window_out | Size of output window |
| [in] | units_countNumber | of neurons. |
| [in] | optimization_type | Optimization type (ENUM_OPTIMIZATION) |
Definition at line 3671 of file NeuroNet.mqh.
|
virtual |
Load method.
| [in] | file_handle | handle of file |
Reimplemented from CNeuronProofOCL.
Definition at line 4375 of file NeuroNet.mqh.
|
inlinevirtualinherited |
Get number of neurons in layer.
Definition at line 2965 of file NeuroNet.mqh.
|
virtual |
Save method.
| [in] | file_handle | handle of file |
Reimplemented from CNeuronProofOCL.
Definition at line 4427 of file NeuroNet.mqh.
|
inlinevirtualinherited |
Set the type of activation function (ENUM_ACTIVATION)
Definition at line 2950 of file NeuroNet.mqh.
|
inlinevirtual |
Method for change index of gradient buffer.
| [in] | New | index of buffer |
Definition at line 3646 of file NeuroNet.mqh.
|
inlinevirtual |
Identificator of class.
Reimplemented from CNeuronProofOCL.
Definition at line 3649 of file NeuroNet.mqh.
|
protectedvirtual |
Method for updating weights.
| NeuronOCL | Pointer to previos layer. |
Reimplemented from CNeuronBaseOCL.
Definition at line 3798 of file NeuroNet.mqh.
|
virtualinherited |
Dispatch method for defining the subroutine for updating weights.
| SourceObject | Pointer to previos layer. |
Definition at line 3349 of file NeuroNet.mqh.
|
protectedinherited |
Activation type (ENUM_ACTIVATION)
Definition at line 2936 of file NeuroNet.mqh.
|
protectedinherited |
Multiplier to momentum in SGD optimization.
Definition at line 2932 of file NeuroNet.mqh.
|
protectedinherited |
Buffer of last delta weights matrix (SGD)
Definition at line 2926 of file NeuroNet.mqh.
|
protected |
Matrix of delta weights to previous layer (SGD)
Definition at line 3633 of file NeuroNet.mqh.
|
protectedinherited |
Buffer of first momentum matrix (ADAM)
Definition at line 2928 of file NeuroNet.mqh.
|
protected |
Matrix of first momentum to previous layer (ADAM)
Definition at line 3634 of file NeuroNet.mqh.
|
protectedinherited |
Buffer of gradient tenzor.
Definition at line 2927 of file NeuroNet.mqh.
|
protectedinherited |
Size of step.
Definition at line 3537 of file NeuroNet.mqh.
|
protectedinherited |
Input window size.
Definition at line 3536 of file NeuroNet.mqh.
|
protected |
Size of out window.
Definition at line 3630 of file NeuroNet.mqh.
|
protectedinherited |
Index of neuron in layer.
Definition at line 2935 of file NeuroNet.mqh.
|
protectedinherited |
Object for working with OpenCL.
Definition at line 2922 of file NeuroNet.mqh.
|
protectedinherited |
Optimization method (ENUM_OPTIMIZATION)
Definition at line 2937 of file NeuroNet.mqh.
|
protectedinherited |
Buffer of Output tenzor.
Definition at line 2923 of file NeuroNet.mqh.
|
protectedinherited |
Buffer of previous iteration Output tenzor.
Definition at line 2924 of file NeuroNet.mqh.
|
protectedinherited |
Buffer of second momentum matrix (ADAM)
Definition at line 2929 of file NeuroNet.mqh.
|
protected |
Matrix of second momentum to previous layer (ADAM)
Definition at line 3635 of file NeuroNet.mqh.
|
protectedinherited |
Count of iterations.
Definition at line 2933 of file NeuroNet.mqh.
|
protectedinherited |
Buffer of weights matrix.
Definition at line 2925 of file NeuroNet.mqh.
|
protected |
Matrix of weights to previous layer.
Definition at line 3632 of file NeuroNet.mqh.