资源简介
识别CIFAR数据集中的10类物体
一、 实验目标
熟悉使用深度学习工具tensorflow,基于该平台对Cifar-10 中的图像数据进行分类识别,在这个过程中掌握卷积神经网络的基本思想。

代码片段和文件信息
# Copyright 2015 Google Inc. 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.
# ==============================================================================
“““Builds the CIFAR-10 network.
Summary of available functions:
# Compute input images and labels for training. If you would like to run
# evaluations use input() instead.
inputs labels = distorted_inputs()
# Compute inference on the model inputs to make a prediction.
predictions = inference(inputs)
# Compute the total loss of the prediction with respect to the labels.
loss = loss(predictions labels)
# Create a graph to run one step of training with respect to the loss.
train_op = train(loss global_step)
“““
# pylint: disable=missing-docstring
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import gzip
import os
import re
import sys
import tarfile
import tensorflow.python.platform
from six.moves import urllib
import tensorflow as tf
#from tensorflow.models.image.cifar10 import cifar10_input
import cifar10_input
FLAGS = tf.app.flags.FLAGS
# Basic model parameters.
tf.app.flags.DEFINE_integer(‘batch_size‘ 128
“““Number of images to process in a batch.“““)
tf.app.flags.DEFINE_string(‘data_dir‘ ‘cifar10_data/‘
“““Path to the CIFAR-10 data directory.“““)
# Global constants describing the CIFAR-10 data set.
IMAGE_SIZE = cifar10_input.IMAGE_SIZE
NUM_CLASSES = cifar10_input.NUM_CLASSES
NUM_EXAMPLES_PER_EPOCH_FOR_TRAIN = cifar10_input.NUM_EXAMPLES_PER_EPOCH_FOR_TRAIN
NUM_EXAMPLES_PER_EPOCH_FOR_EVAL = cifar10_input.NUM_EXAMPLES_PER_EPOCH_FOR_EVAL
# Constants describing the training process.
MOVING_AVERAGE_DECAY = 0.9999 # The decay to use for the moving average.
NUM_EPOCHS_PER_DECAY = 350.0 # Epochs after which learning rate decays.
LEARNING_RATE_DECAY_FACTOR = 0.1 # Learning rate decay factor.
INITIAL_LEARNING_RATE = 0.1 # Initial learning rate.
# If a model is trained with multiple GPU‘s prefix all Op names with tower_name
# to differentiate the operations. Note that this prefix is removed from the
# names of the summaries when visualizing a model.
TOWER_NAME = ‘tower‘
DATA_URL = ‘http://www.cs.toronto.edu/~kriz/cifar-10-binary.tar.gz‘
def _activation_summary(x):
“““Helper to create summaries for activations.
Creates a summary that provides a histogram of activations.
Creates a summary that measure the sparsity of activ
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 602251 2018-07-07 10:05 报告.docx
文件 14151 2017-06-12 18:47 cifar10\cifar10.py
文件 5675 2017-06-12 18:47 cifar10\cifar10_eval.py
文件 9289 2017-06-12 18:47 cifar10\cifar10_input.py
文件 4706 2017-06-12 18:47 cifar10\cifar10_train.py
文件 63 2018-06-14 19:43 cifar10\readme.txt
目录 0 2018-06-14 19:42 cifar10
----------- --------- ---------- ----- ----
636135 7
相关资源
- 广工操作系统实验
- 广工多媒体技术基础试卷
- 广工软件工程复习资料2016年6月(20
- 广工数据结构实验
- 复杂模型机的设计与实现
- 广工移动web课程设计
- 广东工业大学操作系统实验源码
- 广工EDA实验
- 广工离散数学课件
- 广工SOA与Web Service技术实验报告
- 广工数字逻辑课设-篮球比赛计分器
- 广东工业大学题目详解含截图Anyview
- 数字集成电路课后习题答案
- 操作系统课程设计完整版报告+源程序
- 广工信工信号与系统考试试卷
- 广东工业大学 各年 计算机图形学最全
- 广东工业大学历年数据库试卷
- 广工2015年软件工程试卷
- 广工信工图像处理作业
- 广工编译原理的复习资料试卷等
- 计算机操作系统历年期末试卷广工版
- 广工算法设计试卷
- 广工EDA实验报告基于Libero
- 广工 虚拟化与云计算课程报告 Hadoo
- 广工 数据库课程设计 成绩管理系统
- 计算机图形学历年期末试卷广工版
- 广工计算机组成原理实验报告
- 广工eda实验报告和代码
- 微机上机实验报告广工实验报告+截图
- 广东工业大学操作系统试卷2016.12期末
评论
共有 条评论