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

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. 【转载】美国人教你这样用Google

    大前提:英文Google→www.google.com 第一篇 在搜索框上输入:“indexof/”inurl:lib 再按搜索你将进入许多图书馆,并且一定能下载自己喜欢的书籍. 在搜索框上输入:“i ...

  2. CodeForces 570E DP Pig and Palindromes

    题意:给出一个n行m列的字符矩阵,从左上角走到右下角,每次只能往右或者往下走,求一共有多少种走法能得到回文串. 分析: 可以从两头开始考虑,每次只走一样字符的格子,这样得到的两个字符串拼起来之后就是一 ...

  3. matlab callback 数据传递

    M文件中内的每个Callback都可以视为一个独立的可执行的接口,因此,任一个Callback触发后所执行的运算值若要在其他Callback中使用,就无法与MATLAB工作空间内的变量继续执行操作,也 ...

  4. mongodb v2.4.9 快速操作记录

    参考链接:http://www.runoob.com/mongodb/mongodb-tutorial.html oschina链接:https://gitee.com/dhclly/icedog.s ...

  5. Scala学习-01-变量与类型

    Scala运行在jvm之上,可以调用Java类库和与Java框架交互,并将面向对象与面向函数结合在一起. 特点: 1 保留了静态类型检查.安全保障高. 2 函数式编程,更加灵活. 3 运行于jvm之上 ...

  6. Verlet Integration

        Verlet Integration Verlet 积分法是一种用于求解牛顿运动方程的数值方法,被广泛运用于动力学模拟以及视频游戏中.尔莱算法的优点在于:数值稳定性比简单的欧拉方法高很多,并保 ...

  7. Python文件处理、函数的基本应用

    可读可写: r+t:可读.可写 w+t:可写.可读with open('b.txt','w+t',encoding='utf-8') as f:    print(f.readable())    p ...

  8. 九度oj 题目1362:左旋转字符串(Move!Move!!Move!!!)

    题目描述: 汇编语言中有一种移位指令叫做循环左移(ROL),现在有个简单的任务,就是用字符串模拟这个指令的运算结果.对于一个给定的字符序列S,请你把其循环左移K位后的序列输出.例如,字符序列S=”ab ...

  9. hibernate与struts框架实现增删改查

    这里配置hibernate与struts不再过多赘述,配置搭建前文已经详细讲解,配置如下: hibernate.hbm.xml配置: <?xml version="1.0" ...

  10. ubuntu系统14.04安装php5

    背景:        阅读新闻 Ubuntu 14.04 LTS 安装 LNMP Nginx\PHP5 (PHP-FPM)\MySQL [日期:2014-05-27] 来源:imcn.me  作者:L ...