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 ...
随机推荐
- 风变编程笔记(一)-Python基础语法
第0关 print()函数与变量 1. print()函数print()函数:告诉计算机,把括号的内容显示在屏幕上 # 不带引号 print(1+1) # 让计算机读懂括号里的内容,打印最终的结果 ...
- C++-蓝桥杯-入门训练
Fibonacci数列,快速幂 #include <cstdio> ][];}; ,MOD=; Matrix A,B,O,I; Matrix Mul(Matrix A,Matrix B){ ...
- npm命令笔记-----转自网络,仅供自己查看使用
npm是一个node包管理和分发工具,已经成为了非官方的发布node模块(包)的标准.有了npm,可以很快的找到特定服务要使用的包,进行下载.安装以及管理已经安装 的包. npm常用指令 1.npm ...
- Latex中遇到 No room for a new \count 问题的解决
在tex文件中加入etex宏包. \usepackage{etex} 最好加载第一个宏包位置 PDF合并 \documentclass[a4paper]{article}\usepackage{pdf ...
- 微信小程序判断input是否为空
微信小程序中用到input值时候,判断其内容是否为空,可以用if-else判断内容的length,也可以给input加点击事件,判断其内容:以下是我解决问题的过程wxml代码 <view cla ...
- ALSA lib编译
http://blog.sina.com.cn/s/blog_7d7e9d0f0101lqlp.html alsa lib: #!bin/sh rm -rf ./output/* mkdir -p ...
- [AH2017/HNOI2017] 单旋 - Splay
Splay 暴力维护节点信息即可 #include<iostream> #include<cstdio> #include<cstring> #include< ...
- PATA-1151 LCA in a Binary Tree
题意:根据前序和中序建立树,寻找两个点的LCA. 我在之前的博客中写了关于LCA的多种求法. https://www.cnblogs.com/yy-1046741080/p/11505547.html ...
- mysql的优化总结
1,允许数据库适当冗余提高查询效率 2,对于索引的使用要适当
- java 字符+操作,字符串+操作
字符额 “+” 操作 是拿字符在计算机底层对应的数值来进行计算的 ‘A’ = 65 A-Z是连续的 'a' = 97 a-z是连续的 '0' = 48 0-9是连续的 算数表达式中包含多个基本数据类型 ...