
co
chan.zc
DL & ML & SemanticSegmentation & Multimodal
展开
-
解决错误AttributeError: 'dict' object has no attribute 'has_key'
运行co的train.py时报错AttributeError: ‘detection_dic’ object has no attribute ‘has_key’原因:python3以后删除了has_key()方法解决方法:将if self.detection_dic.has_key(vidname):修改为 if vidname in self.detection_dic:...原创 2020-01-09 12:57:01 · 2689 阅读 · 0 评论 -
.h5文件的写入和读取(HDF5)
h5接受的数据是矩阵跟mat方法一致,但是具有更强的压缩性能使用hdf5依赖于python的工具包:h5pyimport h5py #导入工具包import numpy as np#HDF5的写入:imgData = np.zeros((30,3,128,256))f = h5py.File('HDF5_FILE.h5','w') #创建一个h5文件,文件指针是ff['data...原创 2020-01-08 15:04:53 · 16662 阅读 · 0 评论 -
解决 ImportError: cannot import name imsave 的报错问题
问题:Anaconda环境中安装了scipy1.3.2(目前的最新版本), 运行下面这句话:from scipy.misc import imsave报错:ImportError: cannot import name imsave查阅了很多教程, 提示需要导入Pillow包, 但我的环境中已安装了.解决办法:不安装最新版本的scipy, 安装scipy1.2.1pip...原创 2020-01-08 13:34:51 · 590 阅读 · 0 评论