TensorFlow Official ResNet-程序员宅基地

技术标签: Practice  

项目地址:https://github.com/tensorflow/models/tree/master/official/resnet

首先将models文件夹加入Python Path中,否则会报错ImportError: No module named official.resnet

$ export PYTHONPATH=$PYTHONPATH:models

查看cifar10_download_and_extract.py的文档

$ python cifar10_download_and_extract.py --help
usage: cifar10_download_and_extract.py [-h] [--data_dir DATA_DIR]

optional arguments:
  -h, --help           show this help message and exit
  --data_dir DATA_DIR  Directory to download data and extract the tarball

开始下载数据,使用参数--data_dir指定下载数据的文件夹

$ python cifar10_download_and_extract.py --data_dir=cifar_data
>> Downloading cifar-10-binary.tar.gz 100.0%
Successfully downloaded cifar-10-binary.tar.gz 170052171 bytes.

查看cifar10_main.py的文档

$ python cifar10_main.py --help
Runs a ResNet model on the CIFAR-10 dataset.
flags:

models/official/resnet/cifar10_main.py:
  -bs,--batch_size:
    Batch size for training and evaluation. When using multiple gpus, this is
    the
    global batch size for all devices. For example, if the batch size is 32 and
    there are 4 GPUs, each GPU will get 8 examples on each step.
    (default: '128')
    (an integer)
  --[no]clean:
    If set, model_dir will be removed if it exists.
    (default: 'false')
  -dd,--data_dir:
    The location of the input data.
    (default: '/tmp/cifar10_data')
  -df,--data_format: <channels_first|channels_last>:
    A flag to override the data format used in the model. channels_first
    provides a
    performance boost on GPU but is not always compatible with CPU. If left
    unspecified, the data format will be chosen automatically based on whether
    TensorFlow was built for CPU or GPU.
  -ebe,--epochs_between_evals:
    The number of training epochs to run between evaluations.
    (default: '10')
    (an integer)
  --[no]eval_only:
    Skip training and only perform evaluation on the latest checkpoint.
    (default: 'false')
  -ed,--export_dir:
    If set, a SavedModel serialization of the model will be exported to this
    directory at the end of training. See the README for more details and
    relevant
    links.
  -ft,--[no]fine_tune:
    If True do not train any parameters except for the final layer.
    (default: 'false')
  -hk,--hooks:
    A list of (case insensitive) strings to specify the names of training hooks.
      Hook:
        loggingtensorhook
        profilerhook
        examplespersecondhook
        loggingmetrichook
      Example: `--hooks ProfilerHook,ExamplesPerSecondHook`
    See official.utils.logs.hooks_helper for details.
    (default: 'LoggingTensorHook')
    (a comma separated list)
  --[no]image_bytes_as_serving_input:
    If True exports savedmodel with serving signature that accepts JPEG image
    bytes
    instead of a fixed size [HxWxC] tensor that represents the image. The former
    is
    easier to use for serving at the expense of image resize/cropping being done
    as
    part of model inference. Note, this flag only applies to ImageNet and cannot
    be
    used for CIFAR.
    (default: 'false')
  -md,--model_dir:
    The location of the model checkpoint files.
    (default: '/tmp/cifar10_model')
  -pmcp,--pretrained_model_checkpoint_path:
    If not None initialize all the network except the final layer with these
    values
  -rs,--resnet_size:
    The size of the ResNet model to use.
    (default: '56')
  -rv,--resnet_version: <1|2>:
    Version of ResNet. (1 or 2) See README.md for details.
    (default: '1')
  -te,--train_epochs:
    The number of epochs used to train.
    (default: '182')
    (an integer)

Try --helpfull to get a list of all flags.
版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
本文链接:https://blog.csdn.net/o0Helloworld0o/article/details/83445360

智能推荐

安卓按键响应四种方式_android 休眠,按键响应-程序员宅基地

文章浏览阅读2.2k次,点赞2次,收藏11次。目录标题一、按键响应方式一1.1 绑定onclick函数1.2 按键响应函数实现1.3 效果二、按键响应方式二2.1 定义监听器接口2.2 绑定响应接口2.3 效果三、按键响应方式三3.1 定义变量Button3.2 绑定局部变量Button和xml中button3.3 设置按键响应3.4 效果四、按键响应方式四一、按键响应方式一1.1 绑定onclick函数当按键被按下就会去执行函数buttonBeClicked1.2 按键响应函数实现在MainActivity.java文件中去添加响应函数_android 休眠,按键响应

前端meta标签_前端开发meta标签-程序员宅基地

文章浏览阅读52次。meta主要用于设置网页的一些元数据,元数据不是给用户看的。 charset用于指定网页的字符集,<meta charset = "utf-8"> name 元数据的名称,content元数据的数据值;name常用的有:keywrods 关键字 <meta name="Keywords" content="网上购物,网上商城,家电,手机,电脑,服装,居家,母婴,美妆,个护,食品,生鲜,京东"/> decription 描述 : <m_前端开发meta标签

在SpringBoot中使用MockMvc和Junit进行单元测试_springboot junit-jupiter mockmvc-程序员宅基地

文章浏览阅读2.5k次。Mock在面向对象的程序设计中,模拟对象(英语:mock object)是以可控的方式模拟真实对象行为的假对象。在编程过程中,通常通过模拟一些输入数据,来验证程序是否达到预期结果。使用Mockito一般分三个步骤:1、模拟测试类所需的外部依赖;2、执行测试代码;3、判断执行结果是否达到预期。MockMvc基于RESTful风格的SpringMVC单元测试,可以测试完整的SpringMVC流程,即从URL请求到控制处理器,带到视图渲染都可以测试。MockMvc是由spring-test包提供,实_springboot junit-jupiter mockmvc

RK3288[android 7.1]调试笔记 移除u-boot层logo显示,保留kernel层logo显示_rk3288 内核logo不显示-程序员宅基地

文章浏览阅读3.4k次,点赞2次,收藏12次。1 把uboot层logo的显示关闭修改\u-boot\drivers\video\rockchip_display.c文件dongsy@build-server-100:~/work/dsy/rk3288-Android-7.0/u-boot(edp-lvds)$ git diff drivers/video/rockchip_display.cdiff --git a/drivers/v..._rk3288 内核logo不显示

异步fifo设计及验证verilog代码_异步fifo验证-程序员宅基地

文章浏览阅读337次。异步fifo设计及验证verilog代码_异步fifo验证

Python入门学习笔记第十二章——游戏制作之武装飞船~~~_飞船的位图-程序员宅基地

文章浏览阅读847次,点赞2次,收藏9次。该整个项目了在前面十一章的学习中,我们已经对Python这门语言有了一个比较基本的认识和了解,那么接下来,我们会通过一些项目的学习,来加深和拓展我们对Python的认知。那么我们首先就是尝试做一个游戏——武装飞船。因为Python做游戏我也是第一次,所以要是一步步学着做完了,估计回来再写也写不清楚,就一步步来,一步步写吧。准备工作首先,我们需要下载pygame,这里下载的方法有很多,我们可以之间在终端输入pip install pygame就可以实现下载,也可以在官网上下载安装,这里其实还是很容易的_飞船的位图

随便推点

nginx: [error] invalid PID number "" in "/usr/local/webserver/nginx/logs/nginx.pid"-程序员宅基地

文章浏览阅读1.2k次。nginx -c /usr/local/webserver/nginx/conf/nginx.confnginx -s reload安装nginx1. tar xvzf ./configure --prefix=/usr/local/nginxyum -y install pcre*yum -y install zlib-devel2.

基于ARM9 编写LED汇编程序_arm9.芯片程序-程序员宅基地

文章浏览阅读1k次。下定决心考研了,把之前的写的笔记都整理整理^-^!ARM芯片启动过程(大多数芯片从0地址启动)1)NOR启动: 1.NOR Flash的基地址为0,片内RAM为0x4000 0000;2.CPU读出NOR上的第一个指令(前4字节),执行CPU继续读出其他指令执行。2)Nand启动:1.片内4K RAM基地址为0,NoR Flash 不可访问; 注:stepping stone是三星MCU的一种启动..._arm9.芯片程序

2021-01-24-程序员宅基地

文章浏览阅读212次。学什么东西都好,可能对于别人来说确实是迟了,但是对于自己来说,永远都不会算迟,增值自己应该是一辈子都在做的事情。我恰好也是大三,专业软件工程,主要做移动开发,现在是在做Android开发。我学校普通2A,环境不怎么样,师资不怎样。对我来说,基本所有编程得知识都是来自于书本和网络。既然现在开始还没有迟,那么就让我分享下我的想法,题主参考下,按重要程度降序排列。**① 强迫自己解决问题。**很多时候,我们的思维都是,学习、不懂、太难了、不想学、放弃。但是实际上问题都没有想象中的难,如果我们一开始就怕太难

最新Vue2.0+组件开源项目库集合_vue2.0项目推荐-程序员宅基地

文章浏览阅读573次。UI组件element ★11612 - 饿了么出品的Vue2的web UI工具套件Vux ★7503 - 基于Vue和WeUI的组件库iview ★5801 - 基于 Vuejs 的开源 UI 组件库mint-ui ★5517 - Vue 2的移动UI元素vue-material ★2790 - 通过Vue Material和Vue 2建立精美的app应用muse-ui ★2..._vue2.0项目推荐

【解决错误】ImportError: No module named seaborn_no module named seaborn命令行怎么解决-程序员宅基地

文章浏览阅读7k次,点赞2次,收藏3次。1. pip安装:pip install seaborn2. conda安装:conda install seaborn_no module named seaborn命令行怎么解决

超详细的大数据学习资源大全!_大学生大数据资源库动画资源-程序员宅基地

文章浏览阅读270次。当今社会,可以说进入了大数据时代,爆炸性的数据信息给传统的计算技术以及信息技术带来术挑战。大数据技术正在助力公众、企业打开DT世界的大门。学习大数据不仅前景好,而且工资高。为了帮助程序员更好、更深入的了解大数据,w3cschool整理了GitHub Awesome Big Data资源,供大家参考。本资源类型主要包括:大数据框架、论文等实用资源集合。1.关系数据库管理系统(RDBMS) ..._大学生大数据资源库动画资源

推荐文章

热门文章

相关标签