Tensorflow机器学习入门——AttributeError: module 'scipy.misc' has no attribute 'toimage'

这个bug的解决办法:
import cv2
# scipy.misc.toimage(image_array).save('cifar10_data/raw/%d.jpg' % i)
cv2.imwrite('cifar10_data/raw/%d.jpg' % i,image_array)
用 cv2.imwrite 代替 scipy.misc.toimage
如果没有安装cv2 ,请用如下命令安装:pip install opencv-python -i https://pypi.tuna.tsinghua.edu.cn/simple/
网上还有一种办法是降低sicpy的版本,个人觉得太麻烦,没试过。
Tensorflow机器学习入门——AttributeError: module 'scipy.misc' has no attribute 'toimage'的更多相关文章
- AttributeError: module 'scipy.misc' has no attribute 'imread'
运行python程序报错:AttributeError: module 'scipy.misc' has no attribute 'imread' 报错原因1:scipy版本过高 解决方案:降低sc ...
- module 'scipy.misc' has no attribute 'toimage',python
anaconda环境下: 错误:python 命令行运行出错:module 'scipy.misc' has no attribute 'toimage' 解决:打开Anaconda prompt,输 ...
- Python报错module 'scipy.misc' has no attribute 'xxx'
Python报错module 'scipy.misc' has no attribute 'imresize' 解决办法: 安装Pillow包,命令如下: pip install Pillow 然后重 ...
- Python报错——module 'scipy.misc' has no attribute 'imresize'
报错是因为要安装PIL库,库名现在为Pillow,在命令行上安装即可: pip3 install Pillow
- ansible报错AttributeError: module 'urllib.request' has no attribute 'HTTPSHandler'
报错内容: TASK [activemq : extract activemq tarball] *************************************************** ...
- Tensorflow机器学习入门——ModuleNotFoundError: No module named 'tensorflow.keras'
这个bug的解决办法: # from tensorflow.keras import datasets, layers, models from tensorflow.python.keras imp ...
- Tensorflow机器学习入门——MINIST数据集识别
参考网站:http://www.tensorfly.cn/tfdoc/tutorials/mnist_beginners.html #自动下载并加载数据 from tensorflow.example ...
- Tensorflow机器学习入门——读取数据
TensorFlow 中可以通过三种方式读取数据: 一.通过feed_dict传递数据: input1 = tf.placeholder(tf.float32) input2 = tf.placeho ...
- Tensorflow机器学习入门——常量、变量、placeholder和基本运算
一.这里列出了tensorflow的一些基本函数,比较全面:https://blog.csdn.net/M_Z_G_Y/article/details/80523834 二.这里是tensortflo ...
随机推荐
- QT+VS中使用qDebug()打印调试信息无法显示
首先右键点击项目名称,找到最后一项属性 然后依次设置为如图所示即可 再次编译后,会弹出CMD窗口,出现qDebug的调试信息.
- bugku 输入密码查看flag
首先进入网页会看到一个网页 然后用bp进行爆破 首先点击clear 然后选中刚下随便输入进去的密码点击add然后设置一下类型 然后进行开始攻击 攻击过程中点击length 根据长度可以判断出密码然后回 ...
- js实现图片选中马上显示功能,选择后可以预览,即选即显
<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title> ...
- 删除数据高级用法:delete,truncate
1.语法: delete 允许使用条件(删除符合条件的数据) 允许使用limit,限制删除的记录数.limit N 常见的是,limit配合order by来使用:先将结果排序,再删除固定数量 ...
- 【转】VMware Converter迁移linux系统虚拟机
原始出处 今天接到一个需求,迁移一台linux的业务系统到vCenter云管理平台,其中遇到一些问题,于是进行了排错,这个过程与大家分享,下面把整个步骤进行截图说明. 1. 首先,登录到VMware ...
- Django框架之ORM的相关操作(一)
一.一般操作 from django.db import models import datetime # Create your models here. class Author(models.M ...
- stopWatch 用法
package com.example.stopwatch; import org.springframework.util.StopWatch; public class TestStopWatch ...
- 高级命令之awk
1.提取文件内容 2.提取ip
- 关于 appium get_attribute 方法的坑
(得要学着看源码) 问题: self.driver.find_element_by_id("id").get_attribute("content-desc") ...
- VMware安装EVE
众所周知,EVE是一个非常强大的仿真环境,能给我们学习带来很大的帮助,这里主要简单记录一下安装在VMware下安装EVE的过程. 1.准备: 我安装的VMware是WORKSTATION 12 PRO ...