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 ...
随机推荐
- 普及C组第二题(8.4)
2266. 古代人的难题 (File IO): input:puzzle.in output:puzzle.out 时间限制: 1000 ms 空间限制: 60000 KB 题目: 门打开了, 里面 ...
- Java进阶学习(4)之继承与多态.demo
多媒体数据库小练习 package com.dome; import java.util.ArrayList; public class Database { // private ArrayList ...
- python lib timeit 测试运行时间
目录 1. 简介 1.1. python interface 2. 案例 2.1. timeit() /repeat() 2.2. timer() 1. 简介 27.5. timeit - Measu ...
- 吴裕雄 python 机器学习——伯努利贝叶斯BernoulliNB模型
import numpy as np import matplotlib.pyplot as plt from sklearn import datasets,naive_bayes from skl ...
- Hadoop架构: 流水线(PipeLine)
该系列总览: Hadoop3.1.1架构体系——设计原理阐述与Client源码图文详解 : 总览 流水线(PipeLine),简单地理解就是客户端向DataNode传输数据(Packet)和接收Dat ...
- 关于C++指针、引用和const关键字的各种关系
#include <stdio.h> #include<iostream> using namespace std; typedef char *new_type; int m ...
- linux 安装 Jenkins
yum的repo中默认没有Jenkins,需要先将Jenkins存储库添加到yum repos,执行下面的命令: wget -O /etc/yum.repos.d/jenkins.repo https ...
- 7、Maven插件
什么是maven插件? maven 实际上是一类依赖插件执行的框架,每个任务实际上是由插件完成,Maven插件通常被用来 创建jar文件 创建war文件 编译代码文件 代码单元测试 创建工程文档 创建 ...
- Ubuntu18.04配置中文输入法(系统自带的)
Ubuntu18.04配置中文输入法 之前安装Ubuntu18.04的时候选择了english,现在要配置中文的输入法 打开系统设置 点击其中的工具按钮左边第一个 点击管理语言 ==如果系统刚安装可能 ...
- template-组件封装
HTML: //:ligit='ligit' 一致 <div id='app'> <template-swiper :ligit='ligit'></template-s ...