parameters: (filename)
return_statement: return values
docstring: load training samples from *.hdf5 file
docstring_summary: load training samples from *.hdf5 file
docstring_tokens: load training samples from * . hdf5 file
function: def load_hdf5(filename):
      """
      load training samples from *.hdf5 file
      """
      if not(os.path.exists(filename)):
          print("file:", filename, "does not exist")
          os._exit(1)
      if os.path.splitext(filename)[1] != '.h5':
          print("file:", filename, "is not an hdf5 file")
          os._exit(1)
  
      h5_file = h5py.File(filename, 'r')
      values = h5_file[list(h5_file.keys())[0]]
      #values = h5_file.values()[0]
      print("load data size:", values.shape[0])
      return values
function_tokens: def load_hdf5 ( filename ) : if not ( os . path . exists ( filename ) ) : print ( "file:" , filename , "does not exist" ) os . _exit ( 1 ) if os . path . splitext ( filename ) [ 1 ] != '.h5' : print ( "file:" , filename , "is not an hdf5 file" ) os . _exit ( 1 ) h5_file = h5py . File ( filename , 'r' ) values = h5_file [ list ( h5_file . keys ( ) ) [ 0 ] ] #values = h5_file.values()[0] print ( "load data size:" , values . shape [ 0 ] ) return values