Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // declares a matrix with 2 rows and 1 column
- typedef dlib::matrix<double, 2, 1> sample_type;
- .
- .
- .
- (some middle operations)
- .
- .
- .
- // here's how to declare a normalizer in dlib
- dlib::vector_normalizer<sample_type> normalizer;
- // let the normalizer learn the mean and standard deviation of the samples
- normalizer.train(samples);
- // now normalize each sample
- for (unsigned long i = 0; i < samples.size(); ++i)
- samples[i] = normalizer(samples[i]);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement