运行的代码是mnist_with_summaries.py。出现的问题是
tf.app.run() got unexpected keyword argument 'argv'
昨天一直以为是我自己不会运行Python程序以及命令行参数的原因,看了半天Python argparser文档,依然没有头绪。后来尝试搜索error原因才知道我照搬的代码和我tensorflow的版本不一致。话说之前安装tensorflow的时候没注意tensorflow的版本。。。
    1. import tensorflow as tf
    2. 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. Maven运行测试

    原文:http://tianya23.blog.51cto.com/1081650/292315/ Maven运行用于测试中的最佳实践(个人认为,呵呵)   1.创建maven工程 mvn arche ...

  2. aria2 for mac

    本文是在安装好homebrew前提下 brew install aria2 然后配置参数 cd ~ mkdir .aria2 cd .aria2 vim aria2.conf 以下配置粘贴进去,红色需 ...

  3. VS2013在右键菜单添加命令插件开发

    一.选择Visual Studio Package模板建立插件项目 由于此功能需要在右键菜单上添加命令,所以选择Visual Studio Package模板,根据模板向导步骤插件项目,在Select ...

  4. Surface pro4 触摸板手势快捷键

    [一个手指]:这个大家都知道就不必在介绍了,跟之前win7一样,滑动就是鼠标,轻点(或者按左下方)就相当于点鼠标左键.(两个按键按起来真心手感不咋的,所以基本不用)[两个手指]:1.两个手指向上或下滑 ...

  5. 【193】◀▶ PowerShell 官方资料索引

    Microsoft.PowerShell.Core 模块 Windows PowerShell 核心 Cmdlet Windows PowerShell 核心函数 Windows PowerShell ...

  6. Ordeby then by

    先按orderby排序,再按thenby排序 return PartialView("_ClickRangeOnCategory", articles.OrderByDescend ...

  7. JS Promise API

    一.描述 我们知道JavaScript语言的执行环境是“单线程”,所谓单线程,就是一次只能够执行一个任务,如果有多个任务的话就要排队,前面一个任务完成后才可以继续下一个任务. 这种“单线程”的好处就是 ...

  8. 【WIP】外汇与证券交易29个技术指标

    创建: 2017/05/16   更新: 2017/05/30 更新: 2017/10/14 标题加上[WIP],增加创建时间  指标名称  函数原型(prototype)  参考与分析 (refer ...

  9. bzoj 4247: 挂饰【dp】

    bzoj上访问负下标会跑到奇怪的地方-- 其实可以滚动数组优化,但是我看能过就懒得改了 设f[i][j]为已经算了前i个挂饰,当前有j个空的钩子,转移就是f[i][j]=max(f[i-1][j],f ...

  10. bzoj 2006: [NOI2010]超级钢琴【st表+堆】

    设计一个五元组(i,l,r,p,v),表示在以i为左端点,右端点落在(l,r)中的情况下,取最大值v时右端点落在p.把这个五元组塞到优先队列里,以v排序,每次取出一个,然后把这个取过的五元组分成两个( ...