今天在学习队列时按照书里写了一段代码,但是运行时却报错了

import tensorflow as tfq = tf.FIFOQueue(2, "int32")
init = q.enqueue_many(([0, 10],))
x = q.dequeue()
y = x + 1
q_inc = q.enqueue([y])with tf.Session() as sess:init.run()for _ in range(5):v, _ = sess.run([x, q_inc])print(v)

看了网上的原因才知道是因为我把文件名命名为queue,命名与python中的queue包冲突导致报错,修改文件名为queue_test即可

原博https://blog.csdn.net/qin1changping/article/details/79455279

AttributeError: module 'tensorflow' has no attribute 'FIFOQueue'相关推荐

  1. AttributeError: module ‘tensorflow‘ has no attribute ‘Session‘错误解决

    AttributeError: module 'tensorflow' has no attribute 'Session'错误解决 根据网上教程安装tensorflow环境时,最后都会有个测试代码用 ...

  2. AttributeError: module 'tensorflow' has no attribute 'random_normal'

    执行<TensorFlow实战Google深度学习框架(第2版)>only源代码 CH3 时如下语句报错 batch_size = 8 w1= tf.Variable(tf.random_ ...

  3. 问题解决——AttributeError: module ‘tensorflow‘ has no attribute ‘placeholder‘

    问题解决--AttributeError: module 'tensorflow' has no attribute 'placeholder' 参考文章: (1)问题解决--AttributeErr ...

  4. 问题:AttributeError: module 'tensorflow' has no attribute 'gfile'

    目录 问题 原因与解决方案 解决方案1 解决方案2 问题 运行如下代码 if not tf.gfile.exists(DATA_DIRECTORY):tf.gfile.makedirs(DATA_DI ...

  5. tensorflow版本问题导致的错误AttributeError: module ‘tensorflow‘ has no attribute ‘***‘

    问题解决--AttributeError: module 'tensorflow' has no attribute 'placeholder' - yuanyuanWu11 - 博客园 tensor ...

  6. 成功解决AttributeError: module ‘tensorflow‘ has no attribute ‘placeholder‘

    成功解决AttributeError: module 'tensorflow' has no attribute 'placeholder' 目录 解决问题 解决思路 解决方法 T1.降低tensor ...

  7. 成功解决AttributeError: module ‘tensorflow‘ has no attribute ‘contrib‘

    成功解决AttributeError: module 'tensorflow' has no attribute 'contrib' 目录 解决问题 解决思路 解决方法 解决方法

  8. 成功解决AttributeError: module ‘tensorflow‘ has no attribute ‘get_variable‘

    成功解决AttributeError: module 'tensorflow' has no attribute 'get_variable' 目录 解决问题 解决思路 解决方法 解决问题 Attri ...

  9. 成功解决AttributeError: module tensorflow has no attribute placeholder

    成功解决AttributeError: module 'tensorflow' has no attribute 'placeholder' 目录 解决问题 解决思路 解决方法 解决问题 Attrib ...

最新文章

  1. h5引入不同的js文件怎样让第二个js使用第一个js文件中的函数_px2rem-loader使用及注意事项...
  2. 【C 语言】文件操作 ( 写文本文件 | Qt 创建 C 语言命令行项目 )
  3. hdu 4771 Stealing Harry Potter#39;s Precious(bfs)
  4. Linux安装jdk学习
  5. P3911 最小公倍数之和 (atcoder C - LCMs)(反演)
  6. 星地融合→→→6G移动通信关键技术的未来
  7. python crypto安装_关于python安装pip及crypto库
  8. leetcode —— 783. 二叉搜索树结点最小距离
  9. 12.11团队任务汇总
  10. linux c创建文件错误的是,在linux下创建一个类怎么出现会出现这种错误,我感觉是没有错误的,那位高手过来看看...
  11. 华为P50首发麒麟9000L:5nm EUV工艺打造 配置有所缩减
  12. Promise的简单使用例子
  13. springboot整合mybatis-plus多数据源分别连接mysql和oracle
  14. 【详细】小程序模板使用教程
  15. 计算机网络自顶向下第七版第二章课后答案,《计算机网络·自顶向下方法》第七版 第二章 课后习题与问题 答案...
  16. 关于灰鸽子和黑软的一些看法
  17. 台式计算机把光驱改成硬盘,台式机光驱位怎么安装硬盘
  18. 总纲-信息、网络等级保护测评机构 、名单-等保测评机构目录-等保测评公司推荐目录
  19. [Keras深度学习浅尝]实战四· Embedding实现 IMDB数据集影评文本分类
  20. 【案例】别人卖1000刀!一套油管自动生产视频赚钱方法详解,FFMPEG高手看来

热门文章

  1. 通过java理解linux,Java继承的理解
  2. spring-test dao空指针异常_014、Java异常机制
  3. word删除分节符后之前的格式乱了_办公室高级技能之Word邮件合并拆分
  4. 文本对抗攻击入坑宝典
  5. 基于Flume的美团日志收集系统(一)架构和设计
  6. 领域应用 | 到底什么时候使用图数据库?
  7. Python-接口开发入门
  8. ChineseSemanticKB,面向中文处理的12类、百万规模的语义常用词库存
  9. 【LeetCode】3月16日打卡-Day1
  10. 图灵奖获得者、信息安全常青树Adi Shamir:从密码学到AI对抗性样本研究|智源大会嘉宾风采...