How to directly set data in python

10 views
Skip to first unread message

kishida

unread,
Jul 25, 2018, 6:14:40 AM7/25/18
to Caffe Users
Now I set hdf5 data using  prototxt file.
I want to directly set data.
Please tell me how to solve it.

data
 $ h5dump test.hdf5
HDF5 "test.hdf5" {
GROUP "/" {
   DATASET "data" {
      DATATYPE  H5T_IEEE_F32LE
      DATASPACE  SIMPLE { ( 1, 256 ) / ( 1, 256 ) }
      DATA {
      (0,0): 130, 77, 92, 95, 93, 61, 63, 59, 55, 42, 42, 37, 33, 27, 45, 48,
      (0,16): 52, 58, 49, 60, 63, 62, 42, 36, 30, 25, 16, 19, 18, 18, 17, 14,
      (0,32): 15, 16, 16, 9, 9, 9, 8, 9, 18, 20, 21, 19, 19, 17, 17, 16, 14,
      (0,49): 17, 21, 26, 32, 35, 33, 27, 13, 5, 3, 3, 2, 6, 7, 8, 10, 23,
      (0,66): 31, 35, 37, 32, 38, 38, 36, 25, 19, 18, 18, 20, 27, 27, 28, 30,
      (0,82): 45, 67, 84, 108, 157, 244, 255, 244, 185, 106, 78, 62, 49, 38,
      (0,96): 37, 34, 30, 16, 26, 32, 39, 46, 61, 60, 55, 43, 43, 39, 37, 36,
      (0,112): 23, 26, 26, 27, 20, 24, 23, 20, 12, 14, 14, 15, 15, 9, 8, 8,
      (0,128): 10, 19, 21, 21, 20, 12, 14, 15, 15, 13, 17, 16, 14, 12, 24,
      (0,143): 25, 27, 29, 17, 20, 20, 19, 14, 15, 15, 15, 13, 19, 18, 17,
      (0,158): 15, 6, 6, 7, 10, 22, 33, 37, 38, 29, 22, 18, 15, 11, 32, 35,
      (0,174): 40, 49, 92, 103, 104, 97, 38, 32, 29, 28, 24, 20, 15, 11, 7,
      (0,189): 9, 9, 10, 12, 21, 28, 30, 31, 20, 18, 16, 14, 11, 23, 24, 25,
      (0,205): 24, 14, 12, 11, 11, 11, 13, 13, 11, 6, 7, 7, 7, 6, 11, 11, 12,
      (0,222): 13, 10, 9, 9, 8, 4, 6, 8, 10, 15, 25, 26, 25, 20, 16, 14, 12,
      (0,239): 11, 8, 11, 13, 16, 19, 25, 26, 26, 21, 16, 13, 11, 9, 18, 19,
      (0,255): 20
      }
   }
   DATASET "label" {
      DATATYPE  H5T_IEEE_F32LE
      DATASPACE  SIMPLE { ( 1 ) / ( 1 ) }
      DATA {
      (0): 1
      }
   }
}
}

Reply all
Reply to author
Forward
0 new messages