-
大小: 57.89MB文件类型: .rar金币: 1下载: 0 次发布日期: 2022-12-06
- 语言: 其他
- 标签: tensorflow inception TFRecord
资源简介
该文件包含有一个inceptionv3的网络,以及制作和读取TFRecord格式的数据集的方法。
代码片段和文件信息
import tensorflow as tf
import numpy as np
import matplotlib.pyplot as plt
import math
def _variable(name shape):
“““Helper to create a Variable stored on CPU memory.
Args:
name: name of the variable
shape: list of ints
Returns:
Variable Tensor
“““
with tf.device(‘/gpu:0‘):
var = tf.get_variable(name shape)
return var
def batch_norm(x_tensorname=None):
meanvariance=tf.nn.moments(x_tensoraxes = [0])
L=tf.nn.batch_normalization(x_tensormeanvariance0.0110.001name = name)
return L
def conv_layer(inputshapestrideactivation=Truepadding=‘VALID‘name=None):
in_channel=shape[2]
out_channel=shape[3]
k_size=shape[0]
with tf.variable_scope(name) as scope:
kernel=_variable(‘conv_weights‘shape = shape)
conv=tf.nn.conv2d(input = inputfilter = kernelstrides = stridepadding =padding)
biases=_variable(‘biases‘[out_channel])
bias=tf.nn.bias_add(convbiases)
bias = batch_norm(bias ‘bn‘)
if activation is True:
conv_out=tf.nn.relu(biasname = ‘relu‘)
else:
conv_out=bias
return conv_out
def conv_inception(input shape stride= [1111] activation = True padding = ‘SAME‘ name = None):
in_channel = shape[2]
out_channel = shape[3]
k_size = shape[0]
with tf.variable_scope(name) as scope:
kernel = _variable(‘conv_weights‘ shape = shape)
conv = tf.nn.conv2d(input = input filter = kernel strides = stride padding = padding)
biases = _variable(‘biases‘ [out_channel])
bias = tf.nn.bias_add(conv biases)
if activation is True:
conv_out = tf.nn.relu(bias name = ‘relu‘)
else:
conv_out = bias
return conv_out
def inception_block_tradition(input name=None):
with tf.variable_scope(name) as scope:
with tf.variable_scope(“Branch_0“):
branch_0=conv_inception(inputshape = [1128864]name = ‘0a_1x1‘)
with tf.variable_scope(‘Branch_1‘):
branch_1=conv_inception(inputshape = [1128848]name = ‘0a_1x1‘)
branch_1=conv_inception(branch_1shape = [554864]name = ‘0b_5x5‘)
with tf.variable_scope(“Branch_2“):
branch_2=conv_inception(inputshape = [1128864]name = ‘0a_1x1‘)
branch_2=conv_inception(branch_2shape = [336496]name = ‘0b_3x3‘)
with tf.variable_scope(‘Branch_3‘):
branch_3=tf.nn.avg_pool(inputksize = (1331)strides = [1111]padding = ‘SAME‘name = ‘Avgpool_0a_3x3‘)
branch_3=conv_inception(branch_3shape = [1128864]name = ‘0b_1x1‘)
inception_out=tf.concat([branch_0branch_1branch_2branch_3]3)
b=1 # for debug
return inception_out
def inception_grid_reduction_1(inputname=None):
with tf.variable_scope(name) as scope:
with tf.variable_scope(“Branch_0“):
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 153 2018-05-26 10:40 tensorflow-tfrecord\.idea\codest
文件 198 2018-05-26 10:40 tensorflow-tfrecord\.idea\codest
文件 86 2018-03-18 15:56 tensorflow-tfrecord\.idea\dictionaries\zhang.xm
文件 492 2018-05-26 10:41 tensorflow-tfrecord\.idea\google_net.iml
文件 185 2018-05-26 10:41 tensorflow-tfrecord\.idea\misc.xm
文件 272 2018-03-18 15:53 tensorflow-tfrecord\.idea\modules.xm
文件 36283 2018-05-28 20:46 tensorflow-tfrecord\.idea\workspace.xm
文件 19502 2018-05-28 19:38 tensorflow-tfrecord\demo.py
文件 29869 2006-05-05 07:03 tensorflow-tfrecord\jpg\bluebell\image_0241.jpg
文件 37834 2006-05-05 07:03 tensorflow-tfrecord\jpg\bluebell\image_0242.jpg
文件 39620 2006-05-05 07:03 tensorflow-tfrecord\jpg\bluebell\image_0243.jpg
文件 27486 2006-05-05 07:03 tensorflow-tfrecord\jpg\bluebell\image_0244.jpg
文件 51546 2006-05-05 07:03 tensorflow-tfrecord\jpg\bluebell\image_0245.jpg
文件 51051 2006-05-05 07:03 tensorflow-tfrecord\jpg\bluebell\image_0246.jpg
文件 27496 2006-05-05 07:03 tensorflow-tfrecord\jpg\bluebell\image_0247.jpg
文件 29280 2006-05-05 07:03 tensorflow-tfrecord\jpg\bluebell\image_0248.jpg
文件 31243 2006-05-05 07:03 tensorflow-tfrecord\jpg\bluebell\image_0249.jpg
文件 25481 2006-05-05 07:03 tensorflow-tfrecord\jpg\bluebell\image_0250.jpg
文件 30929 2006-05-05 07:03 tensorflow-tfrecord\jpg\bluebell\image_0251.jpg
文件 58349 2006-05-05 07:03 tensorflow-tfrecord\jpg\bluebell\image_0252.jpg
文件 49208 2006-05-05 07:03 tensorflow-tfrecord\jpg\bluebell\image_0253.jpg
文件 26639 2006-05-05 07:03 tensorflow-tfrecord\jpg\bluebell\image_0254.jpg
文件 38494 2006-05-05 07:03 tensorflow-tfrecord\jpg\bluebell\image_0255.jpg
文件 31550 2006-05-05 07:03 tensorflow-tfrecord\jpg\bluebell\image_0256.jpg
文件 30950 2006-05-05 07:04 tensorflow-tfrecord\jpg\bluebell\image_0257.jpg
文件 50187 2006-05-05 07:04 tensorflow-tfrecord\jpg\bluebell\image_0258.jpg
文件 30159 2006-05-05 07:04 tensorflow-tfrecord\jpg\bluebell\image_0259.jpg
文件 41462 2006-05-05 07:04 tensorflow-tfrecord\jpg\bluebell\image_0260.jpg
文件 43310 2006-05-05 07:04 tensorflow-tfrecord\jpg\bluebell\image_0261.jpg
文件 35088 2006-05-05 07:04 tensorflow-tfrecord\jpg\bluebell\image_0262.jpg
............此处省略1366个文件信息
- 上一篇:数字集成电路物理设计144318
- 下一篇:视觉SLAM十四讲.rar
相关资源
- 《Hands-on Machine Learning with Scikit-Learn
- tensorflow+cnn神经网络学习模型保存及调
- inception_v3.ckpt
- 残差网络resnet_50_ckpt文件
- TensorFlow 教材,中文版资料
- Hands On Machine Learning with Scikit-Learn an
- tensorflow实现ICA独立成分分析图像或声
- 强化学习精要 核心算法与TensorFlow实现
- Penn Tree Bank(PTB文本数据集
- tensorflow_gpu==1.14.0版本
- inception_v3权重文件
- TensorFlowSharp
- Tensorflow MINIST数据模型源码.rar
- tensorflow_gpu-1.4.0-cp36-cp36m-win_amd64.whl
- Tensorflow 实战Google深度学习框架高清完
- tensorflow迁移学习
- faster_rcnn_inception_v2_coco_2018_01_28.tar.g
- 自己训练的googlenet inception v1 v3模型
- TensorFlow实战_黄文坚.pdf
- tensorflow win10 编译教程
- tensorflow-1.10.1-cp36-cp36m-linux_aarch64.whl
- fer2013.tar.gz
- 基于TensorFlow的手写中文识别
- 676624《强化学习精要核心算法与Tens
- OpenCV、TensorFlow安装库及安装方法
- cusolver64_100.dll,cusparse64_100.dll
- tensorflow-1.11.0-cp35-none-linux_aarch64.whl
- 支持CUDA10的tensorflow-gpu轮子
- tensorflow1.10.0-cp36win-gpu版
- hands on machine learning with scikit learn an
评论
共有 条评论