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 ...
 
随机推荐
- main函数的参数详解
			
1.定义 C语言规定main函数的参数只能有两个,习惯上这两个参数写为argc和argv.因此,main函数的函数头可写为: main (argc,argv)C语言还规定argc(第一个形参)必须是整 ...
 - bugku  域名解析题   50
			
什么是域名解析???? 首先我们在Windows上找到文件“C:\Windows\System32\drivers\etc\hosts” 然后找到host 双击用记事本打开然后填写上黄色区域上的东西 ...
 - C# 将DataGridView中显示的数据导出到Excel(.xls和.xlsx格式)—NPOI
			
前言 https://blog.csdn.net/IT_xiao_guang_guang/article/details/104217491 本地数据库表中有46785条数据,测试正常 初次运行程 ...
 - redis位图命令
			
概述 redis 的位图就是01的数据格式,redis 主要做有写入,读取和统计.位图相关的命令 : 其中set和get就是 read 和writer , bitcount 统计相关,bitop 是对 ...
 - PyCharm 上传项目到码云托管平台
			
码云平台设置: >先到码云 https://gitee.com/ 注册账号 >创建项目,选择合适项目,点击加号 >填写项目的基础信息 在码云上就创建了项目 >安装 Git ...
 - 优化mysql
			
数据库设计和表创建时就要考虑性能 sql的编写需要注意优化 分区 分表 分库 1.数据库设计和表创建时就要考虑性能 mysql数据库本身高度灵活,造成性能不足,严重依赖开发人员能力.也就是说开发人员能 ...
 - 【npm】安装、搭建独立项目环境
			
目录 安装npm包的几种方式 搭建独立的项目环境 npm常用命令 package.json文件详述 "任何一门计算机语言都包含了丰富的第三方库,npm就是JavaScript这门语言的第三方 ...
 - 01-书城http状态405-此url不支持http方法get
			
错误: http状态405-此url不支持http方法get 原因:
 - Win下PHP5.6版本安装redis扩展
			
首先说一下自己的环境啥的,我用的是phpstudy,其实没啥大用,就是看你的php版本啥的 1.运行phpinfo(),查看php的信息,php的位数和扩展信息,和要下载的扩展文件信息有关, 2.下载 ...
 - java篇 之 ==与equals
			
==是一个比较运算符,基本数据类型比较的是值,引用数据类型比较的是地址值. "=="比"equals"运行速度快,因为"=="只是比较引用. ...