运行的代码是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. Spring Cloud Sleuth 中id的使用

    Spring Cloud Sleuth采用的是Google的开源项目Dapper的专业术语. Span:基本工作单元,发送一个远程调度任务 就会产生一个Span,Span是一个64位ID唯一标识的,T ...

  2. Linux内核--基于Netfilter的内核级包过滤防火墙实现

    测试内核版本:Linux Kernel 2.6.35----Linux Kernel 3.2.1 原创作品,转载请标明http://blog.csdn.net/yming0221/article/de ...

  3. fiddler工具使用

    一.安装 a) 百度fiddler ,下载, 安装 ,无脑流 二.界面介绍 a) 工具栏与状态栏 其中保存是,可以为两种形式:1.text文本形式 2.saz文件结尾数据(能被fiddler软件识别) ...

  4. PCB Web版SI9000阻抗计算器

    在几个月前写过一遍关于: PCB SI9000阻抗计算引擎Web方式实现方法  ,最近开始参考Polar SI9000的界面,将阻抗计算器转为网页版的方式实现.   一.Web版SI9000阻抗计算器 ...

  5. SQL两个字段排序

    ORDER BY  后可加2个字段,用英文逗号隔开. 1.f1用升序, f2降序,sql该这样写: 1 ORDER BY  f1, f2  DESC 2.也可以这样写,更清楚: 1 ORDER BY  ...

  6. E20180324-hm

    popover 弹出框 archive  v. 存档;  n. 档案文件; 档案室;

  7. J20170520-ts

    手取り   净收入,实收额;用手抓住,到手

  8. hdu 1071 The area【定积分】

    用顶点式\( a(x-h)^2+k=y \)解方程,转化为\(ax^2+bx+c=y \)的形式,然后对二次函数求定积分\( \frac{ax^3}{3}+\frac{bx^2}{2}+cx+C \) ...

  9. 用set和shopt设置bash选项

    1.set命令 -o打开选项,+o关闭选项#set -o //显示选项设置#set -o noclobber //打开该选项,重定向将覆盖已存在的文件#set +o noclobber //关闭该选项 ...

  10. 微信支付接口调用问题(android正常,iphone调不起)

    转自:http://blog.csdn.net/tt123123/article/details/53897035 碰到的问题 :根据微信提供的示例代码(ASP.NET),配置好一切后, 用andro ...