Neuron Net
Macros | Functions

Describes the feed forward process for the Neuron of pooling layer. More...

Macros

#define def_k_FeedForwardProof   5
 Index of the kernel of the Pooling neuron for Feed forward process (FeedForwardProof) More...
 
#define def_k_ffp_matrix_i   0
 Inputs tesor. More...
 
#define def_k_ffp_matrix_o   1
 Output tensor. More...
 
#define def_k_ffp_inputs   2
 Number of inputs. More...
 
#define def_k_ffp_window   3
 Size of input window. More...
 
#define def_k_ffp_step   4
 Step size. More...
 

Functions

__kernel void FeedForwardProof (__global double *matrix_i, __global double *matrix_o, int inputs, int window, int step)
 Kernel of the Pooling neuron for Feed forward process (CNeuronProofOCL) More...
 

Detailed Description

Describes the feed forward process for the Neuron of pooling layer.

Macro Definition Documentation

◆ def_k_FeedForwardProof

#define def_k_FeedForwardProof   5

Index of the kernel of the Pooling neuron for Feed forward process (FeedForwardProof)

Definition at line 148 of file NeuroNet.mqh.

◆ def_k_ffp_inputs

#define def_k_ffp_inputs   2

Number of inputs.

Definition at line 151 of file NeuroNet.mqh.

◆ def_k_ffp_matrix_i

#define def_k_ffp_matrix_i   0

Inputs tesor.

Definition at line 149 of file NeuroNet.mqh.

◆ def_k_ffp_matrix_o

#define def_k_ffp_matrix_o   1

Output tensor.

Definition at line 150 of file NeuroNet.mqh.

◆ def_k_ffp_step

#define def_k_ffp_step   4

Step size.

Definition at line 153 of file NeuroNet.mqh.

◆ def_k_ffp_window

#define def_k_ffp_window   3

Size of input window.

Definition at line 152 of file NeuroNet.mqh.

Function Documentation

◆ FeedForwardProof()

__kernel void FeedForwardProof ( __global double *  matrix_i,
__global double *  matrix_o,
int  inputs,
int  window,
int  step 
)

Kernel of the Pooling neuron for Feed forward process (CNeuronProofOCL)

Parameters
[in]matrix_iInputs tesor
[out]matrix_oOutput tensor
inputsNumber of inputs
windowSize of input window
stepStep size

Definition at line 276 of file NeuroNet.cl.

282  {
283  int i=get_global_id(0);
284  int pos=i*step;
285  double result=matrix_o[pos];
286  for(int k=1; k<window; k=k+1)
287  {
288  int shift=k+pos;
289  if(shift>=inputs)
290  break;
291  result=max(result,matrix_o[shift]);
292  }
293  matrix_o[i]=result;
294  }