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

智能推荐

keystone WSGI流程_没有 keystone.wsgi-程序员宅基地

文章浏览阅读110次。https://blog.csdn.net/gj19890923/article/details/50985790_没有 keystone.wsgi

Rasa入门——AI助手和聊天机器人_rasa test.py-程序员宅基地

文章浏览阅读6.9k次,点赞17次,收藏69次。Rasa是一套开源机器学习框架,用于构建基于上下文的AI助手和聊天机器人_rasa test.py

欧美姓氏的来源-程序员宅基地

文章浏览阅读854次。真的很有意思。原文地址:欧美姓氏的来源作者:贝壳憨子 一、英国人的姓氏 早期居住在英国本土的人,一生下来就只取一个名,如:John(约翰)、Hilda(希尔达)。当时,人们群居共处,就地扎寨,因人稀寨小,取名John,Hilda的人屈指可数,人们不易混淆。随着岁月的流逝,小村寨扩展成了大村庄,有些大村庄变成了市镇。这样,在同一地方就有好几个人取名相同。那么人们是怎样区别这些...

线性代数基础:Hessian 矩阵与凸性函数-程序员宅基地

文章浏览阅读1.2k次,点赞19次,收藏23次。1.背景介绍线性代数是计算机科学、数学、物理等多个领域的基础知识之一,它涉及到向量、矩阵等多种概念和方法。在机器学习、深度学习等领域,线性代数是非常重要的。在这篇文章中,我们将讨论 Hessian 矩阵 和凸性函数 等线性代数基础知识,以及它们在机器学习中的应用。2.核心概念与联系2.1 Hessian 矩阵Hessian 矩阵是一种二阶导数矩阵,用于描述一个函数在某一点的曲线特征...

【裸机SDK开发】D1:环境安装和工程建立_d1s 裸机开发-程序员宅基地

文章浏览阅读283次。【裸机SDK开发】D1:环境安装和工程建立k210开发有很多种方式,例如speed的micropython开发、sdk裸机开发、freertos开发作为一个从单片机入门的嵌入式小白而言,裸机开发更适合入门。软件安装下载软件可以联网就不要下载离线包!!!!!!!!下载完成之后点击运行安装即可。配置运行环境搜索安装C/C++ Compile RUN重启IDE安装软件包因为K210裸机开发主要是根据库函数开发,安装合适的软件库,对于开发事半功倍。编译 调试 下载注意!!!!!_d1s 裸机开发

蓝牙 - TI工具 Bluetooth Logger_bt log分析工具-程序员宅基地

文章浏览阅读758次。本文介绍了TI蓝牙调试工具,用来抓取和分析蓝牙固件的日志信息,还有CC256x双模蓝牙设备的协议事务(protocol transactions),并同时支持WL18xx WiLink8通信设备。使用BT Logger和Link Quality Monitor(LQM)工具,就可以对BT Controller的内部数据和状态进行观察,以及与对端设备的协议事务信息。需求硬件需求:- 引出WL18xx设备的BT_UART_DBG pin或CC256x设备的TX_DBG pin.-..._bt log分析工具

随便推点

html中表格的侧边线没了,HTML表格中没有水平边框线的一列-程序员宅基地

文章浏览阅读821次。我试图设计下面的表格,但是我无法避免造型每一个单元格。所有细胞之间应该有一条边界线,除了来自例如第四列。此外,我试图让表格斑马条纹的两部分(它不显示在下面的布局)。HTML表格中没有水平边框线的一列┌───┬───┬───┐ ┌───┬───┬───┐├───┼───┼───┤ ├───┼───┼───┤├───┼───┼───┤ ├───┼───┼───┤├───┼───┼───┤ ├───┼─..._hrml table 没有线

Ubuntu下提示未信任的应用启动器的问题_未信任的应用程序启动器-程序员宅基地

文章浏览阅读2k次。ubuntu下打开系统未知第三方应用时,基于安全机制会提示“未信任的应用启动器的问题”,如下所示:这时只要右键该应用的desktop文件,单击属性,在权限选项卡中勾选“允许作为程序执行文件”即可..._未信任的应用程序启动器

java aes 填充_java中使用AES加密(加密模式为CBC,填充方式:AES/CBC/PKCS7Padding,密钥长度32位)...-程序员宅基地

文章浏览阅读910次。首先导入依赖commons-codeccommons-codec工具类import org.apache.commons.codec.binary.Base64;import javax.crypto.Cipher;import javax.crypto.spec.IvParameterSpec;import javax.crypto.spec.SecretKeySpec;import java...._在java 中使用aes/cbc/pkcs7padding 填充

Mac系统设置Git命令自动补全(最终版)_gitee下载自动补全脚本 macos-程序员宅基地

文章浏览阅读7.2k次,点赞4次,收藏15次。搞了一晚上终于搞定,网上的很多资料都需要从git仓库下载git自身的源码,但是速度是在太慢太慢,最后用了N种方法发现其实不需要下载git源码,所以在这里插个眼,帮助大家TP&amp;amp;lt;安装Brew检查电脑是否安装brew,在终端输入brew,没有安装的话会提示not found command,然后用浏览器打开 brew官网 ,根据其提示在终端输入命令行/usr/bin/ruby -e ..._gitee下载自动补全脚本 macos

【实时日志分析系列之】-------- 技术选型篇_日志系统分析的项目背景及技术选型-程序员宅基地

文章浏览阅读1.5k次。前言大概是节前到节后的小2个月时间,已经把实时日志分析这一套小架子搭了起来,并且已经可以看到成果,现在继续利用业余时间把这个系列总结记录一下。逻辑架构图逻辑架构图如下:一图胜过千言万语,来看下实时日志分析的技术选型以及整个流程。其实这一套大部分都是组件,而整套组件中用到的都是Elastic Stack中的组件。首先采用了filebeat ( elastic st..._日志系统分析的项目背景及技术选型

图像处理:像素间的一些基本关系(领域、领接性、通路、连通分量、距离)_m邻接-程序员宅基地

文章浏览阅读1.2w次,点赞40次,收藏209次。像素间的一些基本关系领域相邻像素——4邻域相邻像素——D邻域相邻像素——8邻域邻接性像素间的邻接性——4邻接像素间的邻接性——8邻接像素间的邻接性——m邻接通路连通性距离领域相邻像素——4邻域4邻域:像素p(x,y)的4邻域是: (x+1,y);(x-1,y);(x,y+1);(x,y-1)用N4(p)表示像素p的4邻域 :相邻像素——D邻域D邻域( diagonal )定义:像素p(x,y)的D邻域是:对角上的点 (x+1,y+1);(x+1,y-1);(x-1,y+1);(x_m邻接

推荐文章

热门文章

相关标签