diff options
author | Paul Mineiro <paul-github@mineiro.com> | 2012-11-24 04:01:04 +0400 |
---|---|---|
committer | Paul Mineiro <paul-github@mineiro.com> | 2012-11-24 04:01:04 +0400 |
commit | aebaead0b7b68f597d50e5b2490ca29d0753a8d7 (patch) | |
tree | bdab612db2512e6a4ac484a4cce4b5294bb78782 /test | |
parent | 68477af4407b27ec8d7a5461eb6a2debd35d91e3 (diff) |
3-layer sigmoidal neural networks
Diffstat (limited to 'test')
-rwxr-xr-x | test/RunTests | 7 | ||||
-rw-r--r-- | test/train-sets/3parity | 8 | ||||
-rw-r--r-- | test/train-sets/ref/3parity.stderr | 32 | ||||
-rw-r--r-- | test/train-sets/ref/3parity.stdout | 0 |
4 files changed, 46 insertions, 1 deletions
diff --git a/test/RunTests b/test/RunTests index cb37a92a..cefeb5e2 100755 --- a/test/RunTests +++ b/test/RunTests @@ -343,7 +343,7 @@ sub check_for_time_regression() { " try removing it\n" } $overall_time0 = $cuser0 + $csystem0; - $pct_change = 100 * ($overall_time1 - $overall_time0) / $overall_time0; + $pct_change = 100 * ($overall_time1 - $overall_time0) / (1e-4+$overall_time0); if ($overall_time0 == 0) { die "$0: Bad times in saved times file: $LastTimeFile," . @@ -580,3 +580,8 @@ __DATA__ {VW} -k -c -d train-sets/seq_small --passes 12 --invariant --searn_passes_per_policy 4 --searn 4 --searn_task sequence train-sets/ref/searn_small.stdout train-sets/ref/searn_small.stderr + +# Test 21: neural network 3-parity with 2 hidden units +{VW} -k -c -d train-sets/3parity --hash all --passes 2000 -b 16 --nn 2 -l 10 --invariant + train-sets/ref/3parity.stdout + train-sets/ref/3parity.stderr diff --git a/test/train-sets/3parity b/test/train-sets/3parity new file mode 100644 index 00000000..74fe86b4 --- /dev/null +++ b/test/train-sets/3parity @@ -0,0 +1,8 @@ +-1 |f 1:1 2:-1 3:-1 +-1 |f 1:-1 2:1 3:-1 +1 |f 1:1 2:1 3:-1 +-1 |f 1:-1 2:-1 3:1 +1 |f 1:1 2:-1 3:1 +1 |f 1:-1 2:1 3:1 +-1 |f 1:1 2:1 3:1 +1 |f 1:-1 2:-1 3:-1 diff --git a/test/train-sets/ref/3parity.stderr b/test/train-sets/ref/3parity.stderr new file mode 100644 index 00000000..295b006b --- /dev/null +++ b/test/train-sets/ref/3parity.stderr @@ -0,0 +1,32 @@ +Num weight bits = 16 +learning rate = 10 +initial_t = 1 +power_t = 0.5 +decay_learning_rate = 1 +randomly initializing neural network output weights and hidden bias +creating cache_file = train-sets/3parity.cache +Reading from train-sets/3parity +num sources = 1 +average since example example current current current +loss last counter weight label predict features +1.550870 1.550870 3 3.0 1.0000 -1.0000 4 +1.919601 2.288332 6 6.0 1.0000 0.7762 4 +2.011137 2.120980 11 11.0 1.0000 -1.0000 4 +2.154878 2.298620 22 22.0 1.0000 0.3713 4 +2.354256 2.553635 44 44.0 -1.0000 1.0000 4 +2.286332 2.216827 87 87.0 -1.0000 1.0000 4 +2.222494 2.158657 174 174.0 1.0000 0.8935 4 +1.716414 1.210335 348 348.0 -1.0000 -0.9598 4 +1.368982 1.021549 696 696.0 1.0000 0.9744 4 +1.151838 0.934694 1392 1392.0 1.0000 1.0000 4 +0.976327 0.800816 2784 2784.0 1.0000 1.0000 4 +0.756642 0.536958 5568 5568.0 1.0000 1.0000 4 +0.378355 0.000000 11135 11135.0 -1.0000 -1.0000 4 + +finished run +number of examples = 16000 +weighted example sum = 1.6e+04 +weighted label sum = 0 +average loss = 0.2633 +best constant = -6.25e-05 +total feature number = 64000 diff --git a/test/train-sets/ref/3parity.stdout b/test/train-sets/ref/3parity.stdout new file mode 100644 index 00000000..e69de29b --- /dev/null +++ b/test/train-sets/ref/3parity.stdout |