Skip to Main Content
Practical Neural Network Recipies in C++
book

Practical Neural Network Recipies in C++

by Masters
June 2014
Intermediate to advanced content levelIntermediate to advanced
493 pages
20h 30m
English
Morgan Kaufmann
Content preview from Practical Neural Network Recipies in C++
332
Chapter 18
void KohNet::in_norm (
double *input,
double *normfac ,
double *synth
)
{
double length, d ;
length = veclen ( nin , input ) ; // Squared length
if (normalization == 0) { // Multiplicative
*normfac = 1.0 / sqrt ( length ) ;
*synth = 0.0 ;
}
else if (normalization == 1) { // Z
*normfac =1.0/ sqrt ( nin ) ;
d = (double) nin - length ;
if (d > 0.0)
*synth = sqrt ( d ) * *normfac ;
else // If the inputs are all -1 to 1
*synth = 0.0 ; // this error never occurs
}
}
The variable nin is a KohNet class variable which is the number of
inputs (n in the above equations). Similarly, normalization is a class
variable that specifies which
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Neural Networks with Keras Cookbook

Neural Networks with Keras Cookbook

V Kishore Ayyadevara
Scientific Computing with Python 3

Scientific Computing with Python 3

Claus Führer, Claus Fuhrer, Jan Erik Solem, Olivier Verdier
Mastering Java Machine Learning

Mastering Java Machine Learning

Uday Kamath, Krishna Choppella

Publisher Resources

ISBN: 9780080514338