com.rtbhouse.model.natives.NeuralNetworkNativeOps.h Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of neural-network-native-ops Show documentation
Show all versions of neural-network-native-ops Show documentation
Small Java lib with few neural network operations:
ReLU, linearForward and simple matrix-by-vector multiplication.
#include
#include
static const float ALPHA = 1.0, BETA = 1.0;
static const int X_INC = 1, Y_INC = 1;
/**
* Rectified linear unit (ReLU) function. Do its operation in-place.
*
* All input vector elements are transformed with function:
* f(x) = max(0, x)
*/
inline void ReLU(float *inOut, const int size) {
int i;
for(i=0; i> %s = [", name);
for(i=0; i