运行的代码是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. 建立自己的私有docker(ssl&login auth)

    建立私有docker需要先建立ssl证书,然后建立htpass的登陆证书 最后使用nginx配置docker-compose.yml 参考: https://www.digitalocean.com/ ...

  2. [noip模拟赛]小U的女装

    https://www.zybuluo.com/ysner/note/1329304 题面 有一张\(n\)点\(m\)边的.不一定联通的无向图. 如果选了一条边,就不能选其两个端点. 现在同时选点和 ...

  3. sql server 日期模糊查询

    转换成varchar类型 ) like '%2010-10-09%' 两个字段拼接成一个字段 SELECT C0252_ID, C0252_name,C0252_Addr, ((select top ...

  4. Ruby IO类

    更新: 2017/06/23   表格大小全部改为100%                             文件输入输出的File....系列函数的文件名参数是字符串! 更新: 2017/06 ...

  5. 洛谷 P1941 飞扬的小鸟【dp】

    设f[i][j]为在坐标(i,j)时的最小点击次数,转移的话从i-1向上飞或者向下掉转移,注意转移完了之后要把管子部分赋值为inf #include<iostream> #include& ...

  6. Spring Boot之配置文件值注入(@ConfigurationProperties)

    前言:Spring Boot配置文件值的注入有两种方式,分别是 @ConfigurationProperties @Value 这里我们使用第一种 首先我们创建一个application.yml文件, ...

  7. python数据库连接例子

    import sqlite3 conn = sqlite3.connect('food.db') curs = conn.cursor() curs.execute(''' CREATE TABLE ...

  8. linux ls touch、umask、 chattr

    1.$PATH2.ls -al ~ (~ 显示隐藏的文件) 3$ cd ~ // 回到自己的主文件4.cp /var/log/wtmp . //复制到当前目录,最后的“.”不要忘 ls -l /var ...

  9. 《Windows核心编程系列》十一谈谈Windows线程池

    Windows线程池 上一篇博文我们介绍了IO完成端口.得知IO完成端口可以非常智能的分派线程.但是IO完成端口仅对等待它的线程进行分派,创建和销毁线程的工作仍然需要我们自己来做. 我们自己也可以创建 ...

  10. 贪心 Codeforces Round #273 (Div. 2) C. Table Decorations

    题目传送门 /* 贪心:排序后,当a[3] > 2 * (a[1] + a[2]), 可以最多的2个,其他的都是1个,ggr,ggb, ggr... ans = a[1] + a[2]; 或先2 ...