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 ...
随机推荐
- 统计redis大key信息(前topN)
相关包下载链接 https://github.com/sripathikrishnan/redis-rdb-tools/releaseshttps://pypi.org/project/python- ...
- 【基础问题】String 类型为什么是final类型
关于为什么此类问题,都能列出12345...种种原因 已创建具体的值不可修改,故本身就是线程安全的,放到多线程中也不会担心被修改,支持在多线程中共享自身 . 因为字符串是不可变的,所以在它创建的时候H ...
- 记录 Docker 的学习过程 (网络篇)
打开2个会话,分别运行以下命令 # docker run -it -P --name nginx2 nginx #-P 端口随机映射 再打开一个会话查看 运行中的容器 # docker ps -aCO ...
- [ZJOI2008] 生日聚会 - dp
共有\(n\)个男孩与\(m\)个女孩打算坐成一排.对于任意连续的一段,男孩与女孩的数目之差不超过 \(k\).求方案数. \(n,m \leq 150, k \leq 20\) Solution 设 ...
- PP: A dual-stage attention-based recurrent neural network for time series prediction
Problem: time series prediction The nonlinear autoregressive exogenous model: The Nonlinear autoregr ...
- VJ数论专题AC代码临时保存
//A #include<bits/stdc++.h> using namespace std; bool vis[1000010]; void Get_Prime() { int n = ...
- C 库函数 - strncpy()
描述 C 库函数 char *strncpy(char *dest, const char *src, size_t n) 把 src 所指向的字符串复制到 dest,最多复制 n 个字符.当 src ...
- CentOS安装RabbitMQ-yum
CentOS安装RabbitMQ----yum安装 一.安装erlang 由于CentOS没有erlang源,需用 第三方源(http://rpmfusion.org/Configuration) 1 ...
- 2019牛客多校第七场 F Energy stones 树状数组+算贡献转化模拟
Energy stones 题意 有n块石头,每块有初始能量E[i],每秒石头会增长能量L[i],石头的能量上限是C[i],现有m次时刻,每次会把[s[i],t[i]]的石头的能量吸干,问最后得到了多 ...
- Go_go build 和 go install
1.作用 go build:用于测试编译包,在项目目录下生成可执行文件(有main包). go install:主要用来生成库和工具.一是编译包文件(无main包),将编译后的包文件放到 pkg 目录 ...