Changeset 40320 for trunk/Ohana/src/opihi/cmd.data/nnet_commands.c
- Timestamp:
- Jan 23, 2018, 1:24:10 PM (8 years ago)
- File:
-
- 1 edited
-
trunk/Ohana/src/opihi/cmd.data/nnet_commands.c (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Ohana/src/opihi/cmd.data/nnet_commands.c
r40319 r40320 14 14 int nnet_delete (int argc, char **argv) { 15 15 16 # if (0)17 16 int status; 18 17 Nnet *nnet; … … 31 30 status = DeleteNnet (nnet); 32 31 if (!status) abort (); 33 # endif34 35 return TRUE;36 }37 38 int nnet_show (int argc, char **argv) {39 40 # if (0)41 Nnet *nnet;42 43 if (argc != 2) {44 gprint (GP_ERR, "USAGE: nnet listnnet (nnet)\n");45 return FALSE;46 }47 48 nnet = FindNnet (argv[1]);49 if (nnet == NULL) {50 gprint (GP_ERR, "nnet %s not found\n", argv[1]);51 return FALSE;52 }53 54 ListPages (nnet);55 # endif56 32 57 33 return TRUE; … … 60 36 int nnet_create (int argc, char **argv) { 61 37 62 if (argc < 5) {38 if (argc < 4) { 63 39 gprint (GP_ERR, "USAGE: nnet create (nnet) (Ninput) [Nnodes] [Nnodes] ... (Noutput)\n"); 64 40 return FALSE; … … 86 62 Vector *vector; 87 63 88 if (argc < 5) {64 if (argc < 4) { 89 65 gprint (GP_ERR, "USAGE: nnet set (nnet) [weights] [biases] ... [weights] [biases] : set nnet weights (images) and biases (vectors)\n"); 90 66 return FALSE; … … 98 74 99 75 // compare argc and nnet[0].Nlayer 100 if (argc - 2 != nnet[0].Nlayer* 2) {76 if (argc - 2 != (nnet[0].Nlayer - 1) * 2) { 101 77 gprint (GP_ERR, "ERROR: invalid number of arguments\n"); 102 78 gprint (GP_ERR, "USAGE: nnet set (nnet) [weights] [biases] ... [weights] [biases] : set nnet weights (images) and biases (vectors)\n"); … … 164 140 Vector *vector; 165 141 166 if (argc < 5) {142 if (argc < 4) { 167 143 gprint (GP_ERR, "USAGE: nnet get (nnet) [weights] [biases] ... [weights] [biases] : get nnet weights (images) and biases (vectors)\n"); 168 144 return FALSE; … … 176 152 177 153 // compare argc and nnet[0].Nlayer 178 if (argc - 2 != nnet[0].Nlayer* 2) {154 if (argc - 2 != (nnet[0].Nlayer - 1) * 2) { 179 155 gprint (GP_ERR, "ERROR: invalid number of arguments\n"); 180 156 gprint (GP_ERR, "USAGE: nnet set (nnet) [weights] [biases] ... [weights] [biases] : set nnet weights (images) and biases (vectors)\n");
Note:
See TracChangeset
for help on using the changeset viewer.
