projects
/
mlp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
automatic commit
[mlp.git]
/
ann.cc
diff --git
a/ann.cc
b/ann.cc
index
c3e9e98
..
758b624
100644
(file)
--- a/
ann.cc
+++ b/
ann.cc
@@
-1,8
+1,10
@@
/*
* mlp-mnist is an implementation of a multi-layer neural network.
*
/*
* mlp-mnist is an implementation of a multi-layer neural network.
*
- * Copyright (c) 2008 Idiap Research Institute, http://www.idiap.ch/
- * Written by Francois Fleuret <francois.fleuret@idiap.ch>
+ * Copyright (c) 2006 École Polytechnique Fédérale de Lausanne,
+ * http://www.epfl.ch
+ *
+ * Written by Francois Fleuret <francois@fleuret.org>
*
* This file is part of mlp-mnist.
*
*
* This file is part of mlp-mnist.
*
@@
-266,10
+268,10
@@
int main(int argc, char **argv) {
ImageSet training_set, validation_set, test_set;
if(nb_training_examples > 0)
ImageSet training_set, validation_set, test_set;
if(nb_training_examples > 0)
- training_set.
extract
_unused_pictures(image_set, nb_training_examples);
+ training_set.
sample_among
_unused_pictures(image_set, nb_training_examples);
if(nb_validation_examples > 0)
if(nb_validation_examples > 0)
- validation_set.
extract
_unused_pictures(image_set, nb_validation_examples);
+ validation_set.
sample_among
_unused_pictures(image_set, nb_validation_examples);
if(save_data && mlp) mlp->save_data();
if(save_data && mlp) mlp->save_data();
@@
-304,7
+306,7
@@
int main(int argc, char **argv) {
// Testing the perceptron ////////////////////////////////////////////
if(nb_test_examples > 0) {
// Testing the perceptron ////////////////////////////////////////////
if(nb_test_examples > 0) {
- test_set.
extract
_unused_pictures(image_set, nb_test_examples);
+ test_set.
sample_among
_unused_pictures(image_set, nb_test_examples);
cout << "Error rate " << mlp->error(&test_set) << " (" << mlp->classification_error(&test_set)*100 << "%)\n";
// This is to test the analytical gradient
cout << "Error rate " << mlp->error(&test_set) << " (" << mlp->classification_error(&test_set)*100 << "%)\n";
// This is to test the analytical gradient