编译旧的代码,会像下面这样提示出错:

deconv_shape3 = tf.pack([shape[0], shape[1], shape[2], NUM_OF_CLASSESS])

AttributeError: 'module' object has no attribute 'pack'

因为TF后面的版本修改了这个函数的名称,把tf.pack改为 tf.stack。

因此只需要替换掉,就可以编译通过了。

tensorflow提示出错'module' object has no attribute 'pack'的更多相关文章

  1. 提示AttributeError: 'module' object has no attribute 'HTTPSHandler'解决方法

    今天在新机器上安装sqlmap,运行提示AttributeError: 'module' object has no attribute 'HTTPSHandler' 网上找了找资料,发现一篇文章ht ...

  2. scrapy 启动失败,scrapy startproject test 出错 'module' object has no attribute 'OP_NO_TLSv1_1

    你先看看 pip install scrapy需要的 pyopenssl  twisted  等和你安装的版本一样么  我的就是因为TWist 版本高于  需要的 用pip install twist ...

  3. AttributeError: 'module' object has no attribute 'gfile'

    While running TensorFlow's classify_image, getting AttributeError: 'module' object has no attribute ...

  4. 'module' object has no attribute 'Thread'解决方法及模块加载顺序

    源码片段: class myThread(threading.Thread): def __init__(self, threadID, name, counter): threading.Threa ...

  5. httplib:AttributeError: 'module' object has no attribute 'HTTPConnection'

    # -*-coding:gb2312-*- #Function:学习python的httplib模块 import httplib conn = httplib.HTTPConnection(&quo ...

  6. 解决:pipenv shell报错:AttributeError: 'module' object has no attribute 'run'

    利用pipenv shell切换到虚拟环境时,显示报错:AttributeError: 'module' object has no attribute 'run' 可以看到是d:\program\p ...

  7. Python AttributeError: 'Module' object has no attribute 'STARTF_USESHOWINDOW'

    夫学须志也,才须学也,非学无以广才,非志无以成学.--诸葛亮 生活有度,自得慈铭 --杜锦阳 今天新来的同事安装环境遇到个莫名其妙的问题: AttributeError: 'Module' objec ...

  8. Python脚本报错AttributeError: ‘module’ object has no attribute’xxx’解决方法

    最近在编写Python脚本过程中遇到一个问题比较奇怪:Python脚本完全正常没问题,但执行总报错"AttributeError: 'module' object has no attrib ...

  9. attributeError:'module' object has no attribute ** 解决办法

    写了一个小脚本,执行的时候报错: Traceback (most recent call last): File "F:/test/qrcode.py", line 109, in ...

随机推荐

  1. py文件转exe时包含paramiko模块出错解决方法

    问题描述:python代码中包含paramiko模块的远程登录ssh,在用pyInstaller转为exe时报错, 报错提示为“No handlers could be found for logge ...

  2. 自己做一款简易的chrome扩展--清除页面广告

    大家肯定有这样的经历,浏览网页的时候,左右两端广告,诸如“屠龙宝刀,点击就送”,以及最近火的不行的林子聪37传奇霸业什么“霸业面具,霸业吊坠”的魔性广告总是充斥我们的眼球. 当然有现成的扩展程序或者插 ...

  3. [转] 对 forEach(),map(),filter(),reduce(),find(),every(),some()的理解

    1.forEach() 用法:array.forEach(function(item,index){}) 没有返回值,只是单纯的遍历 2.map() 用法:array.map(function(ite ...

  4. [每日App一]QQ主题要逆天!轻轻松松月入30万!

    听从吾师秦刚(微信或QQ:1111884)酋长的建议,谋哥(微信viyi88)我开始新的征程,每日更新一篇干货文章(要坚持啊!否则被酋长鄙视了). 好了,废话不多说,今天我给大家揭秘一个你从来想也木有 ...

  5. 《完美应用Ubuntu》第3版 何晓龙 著

    系统篇 用好Ubuntu掌握这些就够了 第1章 Ubuntu的进化 1.1 GNU/Linux的历史和文化 1.1.1 GNU/Linux是Linux的全称 1.1.2 Linux的诞生 1.2 Li ...

  6. logging模块的作用以及应用场景

    一.python中的logging模块 logging模块定义的函数和类为应用程序和库的开发实现了一个灵活的事件日志系统.logging模块是Python的一个标准库模块,由标准库模块提供日志记录AP ...

  7. python-高级编程-04

    [http协议] 断句 : 由于tcp协议是基于流的传输协议,也就是在传输层本身是做不到断句的功能的, 于是断句需要在应用层协议实现.  最初用回车和换行来标示一套命令的结束 如果信息里面有 \r\n ...

  8. Leetcode 462.最少移动次数使数组元素相等

    最少移动次数使数组元素相等 给定一个非空整数数组,找到使所有数组元素相等所需的最小移动数,其中每次移动可将选定的一个元素加1或减1. 您可以假设数组的长度最多为10000. 例如: 输入: [1,2, ...

  9. “玲珑杯”线上赛 Round #17 河南专场

    闲来无事呆在寝室打打题,没有想到还有中奖这种操作,超开心的 玲珑杯”线上赛 Round #17 河南专场 Start Time:2017-06-24 12:00:00 End Time:2017-06 ...

  10. BZOJ 4817 [Sdoi2017]树点涂色 ——LCT 线段树

    同BZOJ3779. SDOI出原题,还是弱化版的. 吃枣药丸 #include <map> #include <cmath> #include <queue> # ...