Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
对于枚举中的 j,y(排序(glob.glob('images/*'))):
z=net.predict([caffe.io.load_image(y)*255.0])[0]
虽然 Python3 上的以下代码,我得到这个输出
* self._open(**self.request.kwargs.copy()) TypeError: _open() got an unexpected keyword argument 'as_grey'*
我实际上弄清楚了这个问题。
In caffe/python/caffe/io.py line 302
img = skimage.img_as_float(skimage.io.imread(filename, as_grey=not color)).astype(np.float32)
我把它改成
img = skimage.img_as_float(skimage.io.imread(filename)).astype(np.float32)