运行的代码是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. Lightoj 1003 - Drunk(拓扑排序)

    One of my friends is always drunk. So, sometimes I get a bit confused whether he is drunk or not. So ...

  2. aapt的常用命令

    1. 列出apk包的内容 aapt l[ist] [-v] [-a] file.{zip,jar,apk} -v 以table形式列出来 -a 详细列出内容 例如:aapt l <你的apk文件 ...

  3. 并不对劲的bzoj4651:loj2086:uoj222:p1712:[NOI2016]区间

    题目大意 有\(n\)(\(n\leq 5*10^5\))个闭区间\([L_1,R_1],[L_2,R_2],...,[L_n,R_n]\)(\(\forall i\in [1,n],0\leq L_ ...

  4. BZOJ_1415_[Noi2005]聪聪和可可_概率DP+bfs

    BZOJ_1415_[Noi2005]聪聪和可可_概率DP+bfs Description Input 数据的第1行为两个整数N和E,以空格分隔,分别表示森林中的景点数和连接相邻景点的路的条数. 第2 ...

  5. 洛谷 P1072 Hankson 的趣味题 —— 质因数分解

    题目:https://www.luogu.org/problemnew/show/P1072 满足条件的数 x 一定是 a1 的倍数,b1 的因数,a0/a1 与 x/a1 互质,b1/b0 与 b1 ...

  6. 【转】jenkins上配置robotframeworkride自动化脚本任务

    jenkins上配置robotframeworkride自动化脚本任务 编写好的自动化脚本,集成在jenkins上进行自动运行于监控,这里采用分布式构建,在一台slave上进行任务构建与自动化脚本的运 ...

  7. ChartCtrl源码剖析之——CChartTitle类

    CChartTitle类顾名思义,该类用来绘制波形控件的标题,它处于该控件的区域,如下图所示: CChartTitle类的头文件. #if !defined(AFX_CHARTTITLE_H__499 ...

  8. Silverlight 后台利用代码触发 Button 的Click事件

    页面上一个查询按钮,当用户点击 回车键 的时候 处罚查询按钮的onclick事件 public MainPage() { InitializeComponent(); this.KeyDown += ...

  9. ubuntu中desktop与alternate版本的区别(转载)

    转自:http://www.hyleong.com/ubuntu-desktop-alternate/ 今天ubuntu发布了11.04版本,但是下载的时候有desktop和alternate版本,他 ...

  10. 洛谷P2254 [NOI2005]瑰丽华尔兹(单调队列)

    传送门 题解 大概就是设$dp[i][x][y]$表示在第$i$个时间段,在$(x,y)$时的最大滑动距离 然后转移是$dp[i][x][y]=max(dp[i-1][x][y],dp[i][x'][ ...