TensorFlow Official ResNet_tensorflow official retinanet-程序员宅基地

技术标签: 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

智能推荐

编程人员的不二之选 LEGION Y9000X正式发布_y9000x写代码够用吗-程序员宅基地

文章浏览阅读4.6k次。10月11日,联想集团在全球总部未来中心举行了主题为“解密X空间”的新品发布会,正式发布了LEGIONY9000X笔记本电脑,并公布了“联想个人云存储核心测试用户招募”计划。高性能标压轻薄本 LEGION Y9000X赋能内容创造者“你正在用的笔记本是游戏本还是轻薄本?”通过这样的一个问题,联想中国区消费业务笔记本产品规划总监林林,拉开了“解密X空间”的序幕,带来重磅新品——高性能标..._y9000x写代码够用吗

强化学习(reinforcement learning)教程_强化学习教程-程序员宅基地

文章浏览阅读3.4w次,点赞2次,收藏29次。前一阵研究强化学习,发现中文的资料非常少,实例就更少。于是翻译一篇q学习算法的教程,供需要的人学习。原文链接:http://mnemstudio.org/path-finding-q-learning-tutorial.htm正文:Q学习算法是一种用来解决马尔可夫决策过程中最优化问题的方法。Q学习算法最大的特点是它具有选择瞬时奖励和延迟奖励的能力。在每一步中,agent通过观察状态_强化学习教程

SpringBoot+Vue校园二手书交易平台(源码+论文)_基于vue+springboot的校园二手商品交易网站论文-程序员宅基地

文章浏览阅读81次。后端:Java+SpringBoot前端:Vue数据库:MySQL开发软件:Eclipse、MyEclipse、IDEA都可以运行。_基于vue+springboot的校园二手商品交易网站论文

Chrome 开发者工具各种骚技巧-程序员宅基地

文章浏览阅读231次。对于每个前端从业者来说,除了F5键之外,用的最多的另外一个键就是F12了。今天,大神(@小鱼二)推荐我一个网站,才知道chrome还有各种骚姿势。网站是:umaar.com/dev-tip...

【jeecg-boot】jeecg-boot的一些功能扩展:-程序员宅基地

文章浏览阅读2k次。【jeecg-boot】jeecg-boot的一些功能扩展:_jeecg-boot

gitlab上克隆远程分支到本地(报错-error: RPC failed; curl 18 transfer closed with outstanding read data remaining)_gitlab 18: transfer closed with outstanding read d-程序员宅基地

文章浏览阅读2.7k次。首先确保你的电脑有安装git环境,本人使用的是windows下的git环境。双击桌面图标 的Git Bash 打开窗口修改配置git config --global user.namegit config --global user.email如:git config --global user.name "muzidigbig"git config --glo..._gitlab 18: transfer closed with outstanding read data remaining

随便推点

小帅的七个男友 第一章 未恋先失-程序员宅基地

文章浏览阅读164次。第一章 未恋先失&lt;?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /&gt;初中时代的我,还是一个单纯的女孩,对于爱情,以为是眼泪制造出来的。我的圈子并不大,只有几个要好的女生,彭老二,周薇,秋毛。彭老二是个大嘴,校园里发生了什么事情她总是最先知道,通过她的大嘴,什么八卦新闻都逃..._操小帅

MATLAB db4小波分解与重构,语音降噪-程序员宅基地

文章浏览阅读4.4k次,点赞2次,收藏23次。小波变换3级分解Mallat图:将带噪语音作为输入信号进行逐级DWT小波分解,并将分解出的低频成分cA3cA_3cA3​与强制置0后的高频成分cD3cD_3cD3​,cD2cD_2cD2​,cD1cD_1cD1​进行小波重构。Demo:clc,clear[x,Fs]= audioread('MUsic_Test.wav');snr = 20; %设定信噪比,单位dbnoise = randn(size(x)); % 用randn函数产生高斯白噪声Nx = length(x_db4小波

安装和配置SNMP(windows10和Linux)--附SNMP客户端工具_snmp工具-程序员宅基地

文章浏览阅读8.3k次,点赞5次,收藏34次。首先需要安装 snmp ,使用下面的命令进行安装安装完毕之后,使用下面的命令查看是否安装成功当命令行显示如图即为安装成功。_snmp工具

如何正确的敲键盘(打字习惯改正)_怎么敲键盘-程序员宅基地

文章浏览阅读6.4k次,点赞5次,收藏40次。练习打字的官网:http://dazi.kukuw.com/关于打字的详细介绍:一个过来人的打字指法纠正之路_怎么敲键盘

网络安全解决方案-程序员宅基地

文章浏览阅读9.6k次,点赞3次,收藏68次。一,网络安全体系结构网络安全体系结构是对网络信息安全基本问题的应对措施的集合,通常由保护,检测,响应和恢复等手段构成。1,网络信息安全的基本问题研究信息安全的困难在于:边界模糊数据安全与平台安全相交叉;存储安全与传输安全相制约;网络安全,应用安全与系统安全共存;集中的安全模式与分权制约安全模式相互竞争等。评估困难安全结构非常复杂,网络层,系统层,应用层的安全设备,安全协议和安全程序构成一个有机的整体,加上安全机制与人的互动性,网络的动态运行带来的易变性,使得评价网络安全性成为极_网络安全解决方案

QGIS在Windows下的编译——QGIS3.28.15 + Qt5.15.3 +CMake3.28.0 + VS2022 ---64位版本_qgis windows编译-程序员宅基地

文章浏览阅读1.2k次,点赞22次,收藏29次。QGIS在Windows下的编译——QGIS3.28.15 + Qt5.15.3 +CMake3.28.0 + VS2022 ---64位版本_qgis windows编译

推荐文章

热门文章

相关标签