read_h5.py 331 B

123456789101112131415161718192021
  1. # -*- coding: utf-8 -*-
  2. """
  3. Created on Mon Nov 12 20:55:48 2018
  4. @author: fdrea
  5. """
  6. import numpy as np
  7. import h5py
  8. '''
  9. f = h5py.File("./train.h5")
  10. ls = list(f)
  11. #print('list of dataset in this file: \n', ls)
  12. #f['data'].shape
  13. f.close()
  14. '''
  15. f = h5py.File("./train.h5", 'r')
  16. ls = list(f.keys())
  17. f.close()