资源简介
tensorflow的model下的slim,有利于帮助重新训练网络模型
代码片段和文件信息
# Copyright 2016 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License Version 2.0 (the “License“);
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing software
# distributed under the License is distributed on an “AS IS“ BASIS
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# ==============================================================================
r“““Downloads and converts a particular dataset.
Usage:
‘‘‘shell
$ python download_and_convert_data.py \
--dataset_name=mnist \
--dataset_dir=/tmp/mnist
$ python download_and_convert_data.py \
--dataset_name=cifar10 \
--dataset_dir=/tmp/cifar10
$ python download_and_convert_data.py \
--dataset_name=flowers \
--dataset_dir=/tmp/flowers
‘‘‘
“““
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import tensorflow as tf
from datasets import download_and_convert_cifar10
from datasets import download_and_convert_flowers
from datasets import download_and_convert_mnist
FLAGS = tf.app.flags.FLAGS
tf.app.flags.DEFINE_string(
‘dataset_name‘
None
‘The name of the dataset to convert one of “cifar10“ “flowers“ “mnist“.‘)
tf.app.flags.DEFINE_string(
‘dataset_dir‘
None
‘The directory where the output TFRecords and temporary files are saved.‘)
def main(_):
if not FLAGS.dataset_name:
raise ValueError(‘You must supply the dataset name with --dataset_name‘)
if not FLAGS.dataset_dir:
raise ValueError(‘You must supply the dataset directory with --dataset_dir‘)
if FLAGS.dataset_name == ‘cifar10‘:
download_and_convert_cifar10.run(FLAGS.dataset_dir)
elif FLAGS.dataset_name == ‘flowers‘:
download_and_convert_flowers.run(FLAGS.dataset_dir)
elif FLAGS.dataset_name == ‘mnist‘:
download_and_convert_mnist.run(FLAGS.dataset_dir)
else:
raise ValueError(
‘dataset_name [%s] was not recognized.‘ % FLAGS.dataset_name)
if __name__ == ‘__main__‘:
tf.app.run()
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2019-02-02 11:03 slim\
文件 14239 2018-12-20 08:50 slim\BUILD
目录 0 2019-02-02 11:03 slim\datasets\
文件 26248 2018-12-20 08:50 slim\datasets\build_imagenet_data.py
文件 3237 2018-12-20 08:50 slim\datasets\cifar10.py
文件 1918 2018-12-20 08:50 slim\datasets\dataset_factory.py
文件 4680 2018-12-20 08:50 slim\datasets\dataset_utils.py
文件 6325 2018-12-20 08:50 slim\datasets\download_and_convert_cifar10.py
文件 7200 2018-12-20 08:50 slim\datasets\download_and_convert_flowers.py
文件 3895 2018-12-20 08:50 slim\datasets\download_and_convert_imagenet.sh
文件 7389 2018-12-20 08:50 slim\datasets\download_and_convert_mnist.py
文件 3567 2018-12-20 08:50 slim\datasets\download_imagenet.sh
文件 3242 2018-12-20 08:50 slim\datasets\flowers.py
文件 7297 2018-12-20 08:50 slim\datasets\imagenet.py
文件 500000 2018-12-20 08:50 slim\datasets\imagenet_2012_validation_synset_labels.txt
文件 10000 2018-12-20 08:50 slim\datasets\imagenet_lsvrc_2015_synsets.txt
文件 741401 2018-12-20 08:50 slim\datasets\imagenet_me
文件 3264 2018-12-20 08:50 slim\datasets\mnist.py
文件 3069 2018-12-20 08:50 slim\datasets\preprocess_imagenet_validation_data.py
文件 8858 2018-12-20 08:50 slim\datasets\process_bounding_boxes.py
文件 1 2018-12-20 08:50 slim\datasets\__init__.py
目录 0 2019-02-02 11:03 slim\deployment\
文件 23846 2018-12-20 08:50 slim\deployment\model_deploy.py
文件 24384 2018-12-20 08:50 slim\deployment\model_deploy_test.py
文件 1 2018-12-20 08:50 slim\deployment\__init__.py
文件 2306 2018-12-20 08:50 slim\download_and_convert_data.py
文件 6828 2018-12-20 08:50 slim\eval_image_classifier.py
文件 4821 2018-12-20 08:50 slim\export_inference_graph.py
文件 1397 2018-12-20 08:50 slim\export_inference_graph_test.py
目录 0 2019-02-02 11:03 slim\nets\
文件 6120 2018-12-20 08:50 slim\nets\alexnet.py
............此处省略79个文件信息
- 上一篇:simplorer使用说明
- 下一篇:基于NFC卡片的读写功能
评论
共有 条评论