Fork me on GitHub 0

读取h5py文件

import h5py
import numpy as np
import cv2
import matplotlib.pyplot as plt
from mpl_toolkits.mplot3d import Axes3D
f_train=h5py.File('testa.h5','r')
print(f_train['data'])
for key in f_train.keys():
    print(f_train[key].name)   #名字
    print(f_train[key].shape)  #大小
    print(f_train[key].value)  #数据

 

posted @ 2020-03-13 16:10  amazingcode  阅读(2334)  评论(0编辑  收藏  举报