运行的代码是mnist_with_summaries.py。出现的问题是
tf.app.run() got unexpected keyword argument 'argv'
昨天一直以为是我自己不会运行Python程序以及命令行参数的原因,看了半天Python argparser文档,依然没有头绪。后来尝试搜索error原因才知道我照搬的代码和我tensorflow的版本不一致。话说之前安装tensorflow的时候没注意tensorflow的版本。。。
  1.  import tensorflow as tf
    tf.__version__#两个下划线
这样可以看到tensorflow的版本,然后看下代码对应的版本,直接把代码换成对应branch下的代码就可以了。
 
之前直接在Python下安装tensorflow的包。昨天想学习下tensorboard可视化工具,方便日后网络训练参数修改。参考tutorial和代码不料出现的这个bug让我这个Python加tensorflow菜鸟一度奔溃。
 
 
命令行键入:source activate tensorflow 激活conda环境
Python 进入Python命令行。

tf.app.run() got unexpected keyword argument 'argv'的更多相关文章

  1. tf.app.run()

    在很多TensorFlow公布的Demo中,都有这样的代码存在,如下,这是干什么的呢? if __name__ == "__main__": tf.app.run() 我们来看一下 ...

  2. TypeError: __init__() got an unexpected keyword argument 't_command'

    python  .\manage.py migrate 报错如下 λ python .\manage.py migrateTraceback (most recent call last): File ...

  3. senlin __init__() got an unexpected keyword argument 'additional_headers'

    从senlin源码重新编译更新了服务,然后执行 senlin的 cli就遇到了错误: __init__() got an unexpected keyword argument 'additional ...

  4. TypeError: parse() got an unexpected keyword argument 'transport_encoding'

    错误: TypeError: parse() got an unexpected keyword argument 'transport_encoding'You are using pip vers ...

  5. get() got an unexpected keyword argument

    TypeError: get() got an unexpected keyword argument 'news_id'ERROR basehttp 154 "GET /news/3/ H ...

  6. TypeError: while_loop() got an unexpected keyword argument 'maximum_iterations'

    错误: TypeError: while_loop() got an unexpected keyword argument 'maximum_iterations' 参照https://blog.c ...

  7. tensorflow中的tf.app.run()的使用

    指明函数的入口,即从哪里执行函数. 如果你的代码中的入口函数不叫main(),而是一个其他名字的函数,如test(),则你应该这样写入口tf.app.run(test()) 如果你的代码中的入口函数叫 ...

  8. Django--bug--__init__() got an unexpected keyword argument 'qnique'

    建立模型之后,执行迁移,报如下错误: __init__() got an unexpected keyword argument 'qnique' 错误原因:模型的属性的约束添加错误,这种错误一般就是 ...

  9. TypeError: to_categorical() got an unexpected keyword argument 'nb_classes'

    在学习莫烦教程中keras教程时,报错:TypeError: to_categorical() got an unexpected keyword argument 'nb_classes',代码如下 ...

随机推荐

  1. HDU1054 Strategic Game —— 最小点覆盖 or 树形DP

    题目链接:https://vjudge.net/problem/HDU-1054 Strategic Game Time Limit: 20000/10000 MS (Java/Others)     ...

  2. YTU 2864: 分跑道。

    2864: 分跑道. 时间限制: 1 Sec  内存限制: 128 MB 提交: 23  解决: 19 题目描述 有N个人参加100米短跑比赛.跑道为8条.程序的任务是按照尽量使每组的人数相差最少的原 ...

  3. codeforces 686A A. Free Ice Cream(水题)

    题目链接: A. Free Ice Cream //#include <bits/stdc++.h> #include <vector> #include <iostre ...

  4. AC自动机简明教程

    不会kmp和Trie树的请点击右上角X. AC自动机与kmp的唯一区别便是从单模式串变成了多模式串. 那么与kmp相同,AC自动机中的fail指针是指向当前状态的最长后缀. 当然这个后缀要在Trie树 ...

  5. python的thread和threading区别

    python提供了多种模块用来支持多线程编程, thread(在python3中改名为_thread),threading,和 queue模块. 通过加入queue模块,用户可以创建多个线程共享数据的 ...

  6. SimpliciTI协议栈

    SimpliciTI组网过程介绍 1.SimpliciTI支持点对点和星形的网络拓扑结构.   下面介绍以AP为中心的SimpliciTI网路协议的星形拓扑结构通信过程 1)当ED节点上电之后就扫描信 ...

  7. gerrit调试

  8. bzoj 3624: [Apio2008]免费道路【生成树+贪心】

    先把水泥路建生成树,然后加鹅卵石路,这里加的鹅卵石路是一定要用的(连接各个联通块),然后初始化并查集,先把必需的鹅卵石路加进去,然后随便加鹅卵石路直到k条,然后加水泥路即可. 注意判断无解 #incl ...

  9. unsign 字段相减出现负数解决方法

    在项目中做数据统计的时候需要用到几个字段相减得到想要的值,但是因为字段都是无符号,相减出现mysql 错误 BINGINT UNSIGNED VALUE ..  在c语言中两个无符号相减值为负数,该值 ...

  10. linux 服务器 vim编辑器打开php文件出现中文乱码

    进入服务器目录 [root@VM_139_218_centos /]# cd ~ [root@VM_139_218_centos ~]# vim .vimrc 在 .vimrc 文件中写入以下代码: ...