- Timestamp:
- Jan 25, 2018, 6:22:08 AM (8 years ago)
- Location:
- trunk/Ohana/src/opihi/cmd.data
- Files:
-
- 2 edited
-
nnet_train.c (modified) (1 diff)
-
test/nnet.sh (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Ohana/src/opihi/cmd.data/nnet_train.c
r40319 r40323 30 30 31 31 float eta = 1.0; // XXX how do I set this? does it need to update? 32 if ((N = get_argument (argc, argv, "-eta"))) { 33 remove_argument (N, &argc, argv); 34 eta = atof (argv[N]); 35 remove_argument (N, &argc, argv); 36 } 32 37 33 38 if (argc < 4) { -
trunk/Ohana/src/opihi/cmd.data/test/nnet.sh
r40322 r40323 126 126 127 127 macro test.simple 128 if ($0 != 4) 129 echo "USAGE: test.simple (Nmini) (Nepoch) (eta)" 130 break 131 end 132 133 local Nmini Nepoch eta 134 $Nmini = $1 135 $Nepoch = $2 136 $eta = $3 128 137 129 138 # create a nnet with just 2 inputs and 2 outputs … … 153 162 154 163 nnet create tn 2 2 155 nnet train tn x0 x1 y0 y1 -Nmini 50 -Nepoch 50164 nnet train tn x0 x1 y0 y1 -Nmini $Nmini -Nepoch $Nepoch -eta $eta 156 165 157 166 nnet apply tn x0 x1 Y0 Y1 158 lim x0 y0; clear; box; plot -c black x0 y0; plot -c red x0 Y0 167 168 set dy0 = y0 - Y0 169 set dy1 = y1 - Y1 170 171 vstat -q dy0 172 $yp = $MAX 173 $ym = $MIN 174 175 vstat -q dy1 176 $yp = max ($MAX , $yp) 177 $ym = min ($MIN , $ym) 178 $yp = 0.02; $ym = -0.02 179 180 style -pt circle -sz 2; lim x0 $ym $yp; clear; box; plot -c blue x0 dy0; plot -c red x0 dy1 159 181 end 160 182
Note:
See TracChangeset
for help on using the changeset viewer.
