Tensorflow版本更改所产生的问题及解决方案
1.module 'tensorflow' has no attribute 'mul'
tf.mul已经在新版本中被移除,使用 tf.multiply 代替
解决方法
将tf.mul(input1, input2) 改为 tf.multiply(input1, input2)
2.AttributeError: module 'tensorflow' has no attribute 'sub'
将sub换成subtract解决方案如下:
tf.sub(model.y_,model.y)变换为tf.subtract(model.y_, model.y)
3.tf.scalar_summary('batch_loss',
loss)
AttributeError: 'module' object has no attribute
'scalar_summary'
修改为:tf.summary.scalar('batch_loss',
loss)
4.AttributeError:
'module' object has no attribute
'histogram_summary'
修改为:tf.summary.histogram
5.tf.merge_all_summaries()改为:summary_op
= tf.summaries.merge_all()
6.AttributeError:
'module' object has no attribute
'SummaryWriter'
将tf.train.SummaryWriter改为tf.summary.FileWriter
7.AttributeError:
'module' object has no attribute 'SummaryWriter'
tf.train.SummaryWriter改为:tf.summary.FileWriter
8.AttributeError:
'module' object has no attribute 'summaries'
tf.merge_all_summaries()改为:summary_op
= tf.summary.merge_all()
9.AttributeError:
'module' object has no attribute 'histogram_summary'
tf.histogram_summary()改为:tf.summary.histogram()
10.tf.scalar_summary()改为:tf.summary.scalar()
11.tf.image_summary()改为:tf.summary.image()
12.merged_summary_op
= tf.merge.summaries_all()改为summary_op
= tf.merge.summaries_all()
Tensorflow版本更改所产生的问题及解决方案的更多相关文章
- 查看已安装tensorflow版本
http://blog.csdn.net/u011961856/article/details/76861052 由于tensorflow版本不同,可能一些函数的调用也有变换,这时候可能需要查看ten ...
- 【上载虚拟机】XX是一个Workstations 12.X虚拟机,不受XX支持。请选择其他主机或将虚拟机的硬件版本更改为以下选项之一。
背景 由于搭建集群时,要使用Ubuntu系统,还有一点就是咱们使用的Ubuntu系统是定制的,但是它是一个虚拟机,需要通过VMware Workstations这款软件,把咱们定制好的Ubuntu系统 ...
- Deep Photo的TensorFlow版本
Prisma这个应用,你可能很熟悉.这是一个能将不同的绘画风格,迁移到照片中,形成不同艺术风格的图片. 2017年4月,美国康奈尔大学和Adobe的一个研究团队在arvix上通过论文“Deep Pho ...
- IDEA2020.2版本无法开启KDE全局菜单的解决方案
IDEA2020.2版本无法开启KDE全局菜单的解决方案 前言 :更新了2020.2之后全局菜单一直不生效,一直找不到解决的办法,就退回了2020.1,今天又试了一次,成功解决全局菜单显示问题. 之前 ...
- 用anaconda安装最新的TensorFlow版本
Google发布了TensorFlow1.4正式版 在anaconad搜索依旧是1.2的版本,通过一番查阅,找到了方法 1,打开anaconda-prompt 2,激活你要安装的环境 activate ...
- 机器学习&深度学习基础(tensorflow版本实现的算法概述0)
tensorflow集成和实现了各种机器学习基础的算法,可以直接调用. 代码集:https://github.com/ageron/handson-ml 监督学习 1)决策树(Decision Tre ...
- Anaconda多版本Python管理以及TensorFlow版本的选择安装
Anaconda是一个集成python及包管理的软件,记得最早使用时在2014年,那时候网上还没有什么资料,需要同时使用py2和py3的时候,当时的做法是同时安装Anaconda2和Anaconda3 ...
- 查看已安装tensorflow版本以及安装路径
查看版本: import tensorflow as tf tf.__version__ 查看安装路径: tf.__path__
- JDK版本更改,修改环境变量不生效解决办法
问题: 当使用安装版本JDK后,想要更改系统环境变量时,直接更改JAVA_HOME无效. 原因: 当使用安装版本的JDK程序时(一般是1.7版本以上),在安装结束后安装程序会自动将java.exe.j ...
随机推荐
- LeetCode 第四题 Median of Two Sorted Arrays 二人 渣渣选手乱七八糟分析发现基本回到思路1
题目 There are two sorted arrays nums1 and nums2 of size m and n respectively. Find the median of the ...
- 【巨杉数据库SequoiaDB】助力金融科技升级,巨杉数据库闪耀金融展
11月4日,以“科技助创新 开放促改革 发展惠民生”为主题的2019中国国际金融展和深圳国际金融博览会在深圳会展中心盛大开幕. 中国人民银行党委委员.副行长范一飞,深圳市人民政府副市长.党组成员艾学峰 ...
- 在vue项目中使用MD5.js
1.安装 npm install --save js-md5 2.引入 import md5 from 'js-md5'; 3.使用 md5('holle') // bcecb35d0a12baad4 ...
- Python入门10 —— for循环
1.字符串依次取值 students = ['egon', 'lxx', 'alex'] i = 0 while i < 3: print(students[i]) i += 1 2.针对循环取 ...
- Node.js、npm和webpack的安装
1. 前往Node.js官网下载安装程序 2. 一路点击下一步即可 3. 测试是否安装成功 4. 配置npm在安装全局模块时的路径和缓存cache的路径 因为在执行例如npm install webp ...
- 有一个树形结构,实现一个方法getKeys(data,str),获取字符串str在data中的所有上级节点的名称
有一个树形结构,实现一个方法getKeys(data,str);获取字符串str在data中的所有上级节点的名称,例如: getKeys(data,'str1') 返回 ‘key1' getKeys( ...
- dgango 反射
相关 """ 反射 由字符串反向找 变量.函数.类 """ import sys class Person(object): def __i ...
- 更新centos本地仓库(换源)
/etc/yum.repos.d/CentOS-Base.repo 1,首先进行备份 mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/Cen ...
- msfconsole启动失败并报错`not_after=': bignum too big to convert into `long'的解决方法
1.启动msfconsole失败并报如下错误: /usr/share/metasploit-framework/lib/msf/core/payload/android.rb:86:in `not_a ...
- pandas模块详解
Pandas模块 1.什么是pandas pandas是基于numpy构建的,用来做数据分析的 2.pandas能干什么 具备对其功能的数据结构DataFrame,Series 集成时间序列功能 提供 ...