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版本更改所产生的问题及解决方案的更多相关文章

  1. 查看已安装tensorflow版本

    http://blog.csdn.net/u011961856/article/details/76861052 由于tensorflow版本不同,可能一些函数的调用也有变换,这时候可能需要查看ten ...

  2. 【上载虚拟机】XX是一个Workstations 12.X虚拟机,不受XX支持。请选择其他主机或将虚拟机的硬件版本更改为以下选项之一。

    背景 由于搭建集群时,要使用Ubuntu系统,还有一点就是咱们使用的Ubuntu系统是定制的,但是它是一个虚拟机,需要通过VMware Workstations这款软件,把咱们定制好的Ubuntu系统 ...

  3. Deep Photo的TensorFlow版本

    Prisma这个应用,你可能很熟悉.这是一个能将不同的绘画风格,迁移到照片中,形成不同艺术风格的图片. 2017年4月,美国康奈尔大学和Adobe的一个研究团队在arvix上通过论文“Deep Pho ...

  4. IDEA2020.2版本无法开启KDE全局菜单的解决方案

    IDEA2020.2版本无法开启KDE全局菜单的解决方案 前言 :更新了2020.2之后全局菜单一直不生效,一直找不到解决的办法,就退回了2020.1,今天又试了一次,成功解决全局菜单显示问题. 之前 ...

  5. 用anaconda安装最新的TensorFlow版本

    Google发布了TensorFlow1.4正式版 在anaconad搜索依旧是1.2的版本,通过一番查阅,找到了方法 1,打开anaconda-prompt 2,激活你要安装的环境 activate ...

  6. 机器学习&深度学习基础(tensorflow版本实现的算法概述0)

    tensorflow集成和实现了各种机器学习基础的算法,可以直接调用. 代码集:https://github.com/ageron/handson-ml 监督学习 1)决策树(Decision Tre ...

  7. Anaconda多版本Python管理以及TensorFlow版本的选择安装

    Anaconda是一个集成python及包管理的软件,记得最早使用时在2014年,那时候网上还没有什么资料,需要同时使用py2和py3的时候,当时的做法是同时安装Anaconda2和Anaconda3 ...

  8. 查看已安装tensorflow版本以及安装路径

    查看版本: import tensorflow as tf tf.__version__ 查看安装路径: tf.__path__

  9. JDK版本更改,修改环境变量不生效解决办法

    问题: 当使用安装版本JDK后,想要更改系统环境变量时,直接更改JAVA_HOME无效. 原因: 当使用安装版本的JDK程序时(一般是1.7版本以上),在安装结束后安装程序会自动将java.exe.j ...

随机推荐

  1. div中宽高度自适应文字换行居中问题解决

    <html> <head> <meta charset="UTF-8"/> <title>div中宽高度自适应文字换行居中demo& ...

  2. JSP+Servlet开发物流管理系统 源码

    开发环境: Windows操作系统开发工具:Myeclipse+Jdk+Tomcat+MYSQL数据库 运行效果图:

  3. python3爬取淘宝商品(失效)

    最近有人反映淘宝的搜索功能要登录才能用,原先的直接爬取的方法挂了.稍微把之前的代码修改了一下,登录采用最简单的复制cookie来解决. 顺便说一下,这只是根据搜索的的索引界面获取的信息,并未深入的获取 ...

  4. git配置多仓库

    git配置多仓库 github , gitee , coding , gitlab , gitlab.company ..... 真TM多 . 真TM多 . 真TM多 . 生成ssh 生成ssh 密钥 ...

  5. ElasticSearch安装---Windows环境

    一.前提条件 已经安装了jdk 1.8 二.下载 中文官网: https://www.elastic.co/cn/ 中文官网下载: https://elasticsearch.cn/download/ ...

  6. CSS-使用CSS样式的方式

    1.HTML<!DOCTYPE>声明标签 (1)定义和用法 <!DOCTYPE>声明必须是HTML文档的第一行,位于<html>标签之前. <!DOCTYPE ...

  7. vue animate.css训练动画案例 列表循环

    制作目标动画:向上入场添加数据,点击数据右滑动离场 简单页面效果: 实现代码如下: <!DOCTYPE html> <html> <head> <meta c ...

  8. 微信小程序scroll-view去除滚动条

    css代码: .father{ //父元素 width: 100vw; height: 100vh; overflow-x: hidden; overflow-y: auto; } //隐藏滚动条 : ...

  9. C3P0连接技术

    1.导入jar包(两个) c3p0-0.9.5.2.jar和mchange-commons-java-0.2.12.jar导入数据库驱动jar包 2.定义配置文件 配置文件名称:c3p0.proper ...

  10. Copy Paste DWG to older 3ds Max

    Hi, This is quick tutorial: how to install Auto Cad scripts to be able to copy from newer Auto Cad t ...