CorTeX
Core ABI 7
ToolTech Software · C++ library reference
ToolTech
CorTeX overview
Programmer’s manual
Class reference
Change history
CycloPos ↗
Toggle main menu visibility
Loading...
Searching...
No Matches
include
ctxInlineFuncs.h
Go to the documentation of this file.
1
//*****************************************************************************
2
// File : ctxInlineFuncs.h
3
// Description : Inline functions for Cpp exec
4
// Author : Anders Modén
5
// Product : CorTeX 2.0.1
6
//
7
// Copyright © 2015- Anders Modén, Sweden
8
//
9
// NOTE: CorTeX is a software development kit (SDK)
10
// for neural networks and genetic programming.
11
// Licensed by Anders Modén.
12
//
13
//
14
// Revision History...
15
//
16
// Who Date Description
17
//
18
// AMO 150708 Created file (1.0.0)
19
//
20
//******************************************************************************
21
#ifndef __CTX_INLINE_FUNCS_H__
22
#define __CTX_INLINE_FUNCS_H__
23
24
#include "
ctxBase.h
"
25
26
// ------------------------ Utility inlines for Cpp ----------------------
27
28
inline
gzVoid
ctxNeuronFunc_0
(gzFloat *s)
// CTX_NEURON_TYPE_PERCEPTRON
29
{
30
*s = (*s > 0 ? 1.0f : 0.0f);
31
}
32
33
inline
gzVoid
ctxNeuronFunc_6
(gzFloat *s)
34
{
35
*s = (*s>0 ? *s : 0.0f);
36
}
37
38
inline
gzVoid
ctxNeuronFunc_7
(gzFloat *s)
39
{
40
*s = (*s>0 ? *s : expf(*s) - 1.0f);
41
}
42
43
inline
gzVoid
ctxNeuronFunc_8
(gzFloat *s)
44
{
45
*s = (*s>0 ?
SELU_SCALE
* *s :
SELU_ALPHA_SCALE
* (expf(*s) - 1.0f));
46
}
47
48
#endif
//__CTX_INLINE_FUNCS_H__
49
50
ctxBase.h
SELU_ALPHA_SCALE
#define SELU_ALPHA_SCALE
Definition
ctxCommonDefs.h:167
SELU_SCALE
#define SELU_SCALE
Definition
ctxCommonDefs.h:166
ctxNeuronFunc_6
gzVoid ctxNeuronFunc_6(gzFloat *s)
Definition
ctxInlineFuncs.h:33
ctxNeuronFunc_7
gzVoid ctxNeuronFunc_7(gzFloat *s)
Definition
ctxInlineFuncs.h:38
ctxNeuronFunc_0
gzVoid ctxNeuronFunc_0(gzFloat *s)
Definition
ctxInlineFuncs.h:28
ctxNeuronFunc_8
gzVoid ctxNeuronFunc_8(gzFloat *s)
Definition
ctxInlineFuncs.h:43
Generated by
1.18.0