使用h5py保存文件时报错:TypeError: Object dtype dtype('O') has no native HDF5 equivalent

使用h5py保存文件时报错:TypeError: Object dtype dtype(‘O’) has no native HDF5 equivalent

因为保存的时候字典对应的值仍然是字典, file[key]=value h5py进行上述操作时,value不可以是dict字典(也有可能value的值是TensorFlow的tensor数据格式所以报错)。再进行一次for循环取出key和value即可

猜你喜欢

转载自blog.csdn.net/weixin_42074867/article/details/88551026