hzy46 / Deep-Learning-21-Examples

《21个项目玩转深度学习———基于TensorFlow的实践详解》配套代码

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

第一张 module has no attribute toimage

kaixin-bai opened this issue · comments

第一张 module has no attribute toimage的问题解决方法:在scipy/misc/init.py中:
bytescale - Byte scales an array (image) [requires Pillow]
fromimage - Return a copy of a PIL image as a numpy array [requires Pillow]
imfilter - Simple filtering of an image [requires Pillow]
imread - Read an image file from a filename [requires Pillow]
imresize - Resize an image [requires Pillow]
imrotate - Rotate an image counter-clockwise [requires Pillow]
imsave - Save an array to an image file [requires Pillow]
imshow - Simple showing of an image through an external viewer [requires Pillow]
toimage - Takes a numpy array and returns a PIL image [requires Pillow]
所以请安装pillow,pip install pillow, conda install pillow
这样就解决了