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 ...
随机推荐
- Winform递归绑定树节点
/// <summary> /// 绑定树节点 /// </summary> /// <param name="pid"></param& ...
- linux - 服务器性能评估
影响Linux服务器性能的因素 cpu 内存 磁盘IO 网络IO 系统性能评估标准 影响性能因素 好 坏 糟糕 CPU user% + sys%< 70% user% + sys%= 85% u ...
- 阿里云Linux服务器安装Redis 完整步骤(包括处理远程连接问题)
跟随本篇文章步骤,包你成功安装并连接使用. 1.获取redis资源 wget http://download.redis.io/releases/redis-4.0.8.tar.gz 2.解压 tar ...
- Linux运维---16. Kolla部署OpenStack外接rabbit集群
# 前提时rabbit集群已经搭建完成 vim /etc/kolla/globals.yml enable_rabbitmq: "no" rpc_transport_url: &q ...
- JS模板引擎-Mustache模板引擎使用实例1-表格树
1 使用实例代码 1.jsp代码 <!DOCTYPE html> <html lang="zh-CN"> <head> <title> ...
- python中可变类型和不可变类型数据的复制
常见的复制方式有以下5种第1种:通过等号[=]复制 - 不论可变还是不可变数据类型,通过[=]复制后都指向同一个内存地址: - 改变复制后的数据(例子中的anotherStr,anotherList) ...
- 3ds Max File Format (Part 2: The first inner structures; DllDirectory, ClassDirectory3)
Now that we understand the outer structure of the file, it's time to look closer to what's inside. T ...
- 在多租户(容器)数据库中如何创建PDB:方法3 克隆远程PDB
基于版本:19c (12.2.0.3) AskScuti 创建方法:克隆远程PDB(从非当前CDB中进行远程克隆).将 CDB2 中的 ERP1 远程克隆为 CDB1 中的 PDB6 对应路径:Cre ...
- HTTP状态码的浪漫故事
小明是一个程序员,经常加班,在一个和尚部门,一个妹子都没有,所以一直单身. 404(Not Found):服务器无法根据客户端的请求找到资源(网页) 过年回家,老爸老妈给门开一条缝,先看看小明身后-- ...
- java基础之 开发环境配置
一.Window 第一步:下载JDK 首先,我们需要下载java开发工具包JDK,下载地址:http://www.oracle.com/technetwork/java/javase/download ...