IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Mar 26, 2018, 12:54:01 PM (8 years ago)
Author:
eugene
Message:

add jdtolst function; add nnet write function

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Ohana/src/opihi/cmd.data/test/nnet.sh

    r40371 r40376  
     1
     2macro test.io
     3
     4  nnet create t1 2 3 2
     5 
     6  # biases:
     7  vlist v1 -0.2 0.0 0.2
     8  vlist v2 -0.3 0.3
     9
     10  # weights
     11  mcreate m1 2 3
     12  m1[0][0] =  0.2
     13  m1[1][0] = -0.2
     14  m1[0][1] = -0.6
     15  m1[1][1] =  0.5
     16  m1[0][2] = -0.2
     17  m1[1][2] =  0.2
     18
     19  mcreate m2 3 2
     20  m2[0][0] = -0.6
     21  m2[1][0] = -0.4
     22  m2[2][0] = -0.5
     23
     24  m2[0][1] = -0.2
     25  m2[1][1] = -0.5
     26  m2[2][1] =  0.1
     27
     28  # set weights and biases
     29  nnet set t1 m1 v1 m2 v2
     30
     31  nnet write t1 test.nnet.dat
     32  nnet read t2 test.nnet.dat
     33
     34  nnet get t2 M1 V1 M2 V2
     35
     36  set dM1 = M1 - m1
     37  set dM2 = M2 - m2
     38  set dV1 = V1 - v1
     39  set dV2 = V2 - v2
     40
     41  stat dM1
     42  stat dM2
     43 
     44  vstat dV1
     45  vstat dV2
     46end
    147
    248macro test.python
Note: See TracChangeset for help on using the changeset viewer.