GPUMLib  0.2.2
GPU Machine Learning Library
MBPkernels.h
1 /*
2  Noel Lopes is an Assistant Professor at the Polytechnic Institute of Guarda, Portugal
3  Copyright (C) 2009, 2010, 2011, 2012 Noel de Jesus Mendonça Lopes
4 
5  This file is part of GPUMLib.
6 
7  GPUMLib is free software: you can redistribute it and/or modify
8  it under the terms of the GNU General Public License as published by
9  the Free Software Foundation, either version 3 of the License, or
10  (at your option) any later version.
11 
12  This program is distributed in the hope that it will be useful,
13  but WITHOUT ANY WARRANTY; without even the implied warranty of
14  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  GNU General Public License for more details.
16 
17  You should have received a copy of the GNU General Public License
18  along with this program. If not, see <http://www.gnu.org/licenses/>.
19 */
20 
21 #ifndef GPUMLib_MBPkernels_h
22 #define GPUMLib_MBPkernels_h
23 
24 #include <cuda_runtime.h>
25 #include "../common/CudaDefinitions.h"
26 
27 namespace GPUMLib {
28 
31 
52 KERNEL FireLayer(cudafloat * inputs, cudafloat * weights, cudafloat * m, int mOffset, int totalNeuronsWithSelectiveActivation, cudafloat * outputs);
53 
80 void KernelFireLayer(cudaStream_t stream, dim3 & gridSize, int blockSize, cudafloat * inputs, cudafloat * weights, cudafloat * m, int mOffset, int totalNeuronsWithSelectiveActivation, cudafloat * outputs, int numInputs);
81 
105 KERNEL FireOutputLayer(cudafloat * inputs, cudafloat * weights, cudafloat * m, int mOffset, int totalNeuronsWithSelectiveActivation, cudafloat * desiredOutputs, cudafloat * outputs, cudafloat * localGradient, cudafloat * rms, cudafloat * localGradientSpaceNet);
106 
136 void KernelFireOutputLayer(cudaStream_t stream, dim3 & gridSize, int blockSize, cudafloat * inputs, cudafloat * weights, cudafloat * m, int mOffset, int totalNeuronsWithSelectiveActivation, cudafloat * desiredOutputs, cudafloat * outputs, cudafloat * localGradient, cudafloat * rms, cudafloat * localGradientSpaceNet, int numInputs);
137 
164 KERNEL CalculateLocalGradient(cudafloat * rmsF, cudafloat * bestRMS, cudafloat maxErrorGrowth, cudafloat * outputs, cudafloat * weights, cudafloat * m, int mOffset, int totalNeuronsWithSelectiveActivation, cudafloat * localGradientNextLayer, cudafloat * localGradient, cudafloat * localGradientSpaceNet);
165 
190 void KernelCorrectLayerWeights(cudaStream_t stream, dim3 & gridSize, int blockSize, cudafloat * rmsF, cudafloat * bestRMS, cudafloat maxErrorGrowth, cudafloat * inputs, cudafloat * localGradient, cudafloat * weights, cudafloat * learningRate, cudafloat * lastDeltaWithoutLearningMomentum, cudafloat * lastDelta, cudafloat maxStepSize, cudafloat u, cudafloat d, cudafloat r, cudafloat momentum, int numberPatterns);
191 
205 void KernelCalculateRMS(cudaStream_t stream, int blockSize, cudafloat * rms, cudafloat * rmsOut, int numberPatterns, cudafloat numberPatternsNeurons);
206 
228 KERNEL RobustLearning(cudafloat * rmsF, cudafloat * bestRMS, cudafloat maxErrorGrowth, int layers, int * numberWeights, cudafloat ** weights, cudafloat ** bestWeights, cudafloat ** learningRate, cudafloat r, cudafloat ** lastDeltaWithoutLearningMomentum, cudafloat ** lastDelta);
229 
236 KERNEL FireSelectiveInputs(cudafloat * inputs, cudafloat * weights, cudafloat * bias, cudafloat * outputs, int numNeurons);
237 
249 KERNEL CalcLocalGradSelectiveInputs(cudafloat * rmsF, cudafloat * bestRMS, cudafloat maxErrorGrowth, cudafloat * inputs, cudafloat * selectiveNeuronsWeights, cudafloat * selectiveNeuronsBias, cudafloat * weights, cudafloat * localGradientNextLayer, cudafloat * localGradient);
250 
274 void KernelCorrectWeightsSelectiveInputs(cudaStream_t stream, int neurons, int patterns, cudafloat * rmsF, cudafloat * bestRMS, cudafloat maxErrorGrowth, cudafloat * inputs, cudafloat * localGradient, cudafloat * selectiveNeuronsWeights, cudafloat * selectiveNeuronsBias, cudafloat * learningRateWeights, cudafloat * learningRateBias, cudafloat * lastDeltaWithoutLearningMomentumWeights, cudafloat * lastDeltaWithoutLearningMomentumBias, cudafloat * lastDeltaWeights, cudafloat * lastDeltaBias, cudafloat u, cudafloat d, cudafloat r, cudafloat maxStepSize, cudafloat momentum, int numberPatterns);
275 
277 
278 }
279 
280 #endif
void KernelCalculateRMS(cudaStream_t stream, int blockSize, cudafloat *rms, cudafloat *rmsOut, int numberPatterns, cudafloat numberPatternsNeurons)
Definition: CalculateRMS.cu:46
void KernelCorrectWeightsSelectiveInputs(cudaStream_t stream, int neurons, int patterns, cudafloat *rmsF, cudafloat *bestRMS, cudafloat maxErrorGrowth, cudafloat *inputs, cudafloat *localGradient, cudafloat *selectiveNeuronsWeights, cudafloat *selectiveNeuronsBias, cudafloat *learningRateWeights, cudafloat *learningRateBias, cudafloat *lastDeltaWithoutLearningMomentumWeights, cudafloat *lastDeltaWithoutLearningMomentumBias, cudafloat *lastDeltaWeights, cudafloat *lastDeltaBias, cudafloat u, cudafloat d, cudafloat r, cudafloat maxStepSize, cudafloat momentum, int numberPatterns)
KERNEL CalcLocalGradSelectiveInputs(cudafloat *rmsF, cudafloat *bestRMS, cudafloat maxErrorGrowth, cudafloat *inputs, cudafloat *selectiveNeuronsWeights, cudafloat *selectiveNeuronsBias, cudafloat *weights, cudafloat *localGradientNextLayer, cudafloat *localGradient)
KERNEL FireLayer(cudafloat *inputs, cudafloat *weights, cudafloat *m, int mOffset, int totalNeuronsWithSelectiveActivation, cudafloat *outputs)
KERNEL RobustLearning(cudafloat *rmsF, cudafloat *bestRMS, cudafloat maxErrorGrowth, int layers, int *numberWeights, cudafloat **weights, cudafloat **bestWeights, cudafloat **learningRate, cudafloat r, cudafloat **lastDeltaWithoutLearningMomentum, cudafloat **lastDelta)
void KernelFireLayer(cudaStream_t stream, dim3 &gridSize, int blockSize, cudafloat *inputs, cudafloat *weights, cudafloat *m, int mOffset, int totalNeuronsWithSelectiveActivation, cudafloat *outputs, int numInputs)
void KernelCorrectLayerWeights(cudaStream_t stream, dim3 &gridSize, int blockSize, cudafloat *rmsF, cudafloat *bestRMS, cudafloat maxErrorGrowth, cudafloat *inputs, cudafloat *localGradient, cudafloat *weights, cudafloat *learningRate, cudafloat *lastDeltaWithoutLearningMomentum, cudafloat *lastDelta, cudafloat maxStepSize, cudafloat u, cudafloat d, cudafloat r, cudafloat momentum, int numberPatterns)
KERNEL CalculateLocalGradient(cudafloat *rmsF, cudafloat *bestRMS, cudafloat maxErrorGrowth, cudafloat *outputs, cudafloat *weights, cudafloat *m, int mOffset, int totalNeuronsWithSelectiveActivation, cudafloat *localGradientNextLayer, cudafloat *localGradient, cudafloat *localGradientSpaceNet)
#define KERNEL
Defines the type of a kernel function.
KERNEL FireOutputLayer(cudafloat *inputs, cudafloat *weights, cudafloat *m, int mOffset, int totalNeuronsWithSelectiveActivation, cudafloat *desiredOutputs, cudafloat *outputs, cudafloat *localGradient, cudafloat *rms, cudafloat *localGradientSpaceNet)
void KernelFireOutputLayer(cudaStream_t stream, dim3 &gridSize, int blockSize, cudafloat *inputs, cudafloat *weights, cudafloat *m, int mOffset, int totalNeuronsWithSelectiveActivation, cudafloat *desiredOutputs, cudafloat *outputs, cudafloat *localGradient, cudafloat *rms, cudafloat *localGradientSpaceNet, int numInputs)
KERNEL FireSelectiveInputs(cudafloat *inputs, cudafloat *weights, cudafloat *bias, cudafloat *outputs, int numNeurons)
float cudafloat