![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
tensorflow
eclipSYcn
helloworld
展开
-
windows下运行tensorboard
首先,切换到该目录下C:\ProgramData\Anaconda3\Lib\site-packages\tensorflow\examples\tutorials\mnistshift+右键打开cmd python mnist_with_summaries.py在如下目录生成了train和test文件夹C:\tmp\tensorflow\mnist\logs\mnist_with_summar原创 2017-08-18 21:49:37 · 1144 阅读 · 0 评论 -
利用tensorflow建立简单的神经网络
import numpy as npimport tensorflow as tfdef addLayer(inputs, in_c, output_size, activation_function = None): #in_r, in_c = inputs.shape[0],inputs.shape[1] W = tf.Variable(tf.random_normal([in原创 2018-02-07 10:34:46 · 355 阅读 · 0 评论 -
tensorflow函数tf.scatter_sub()
tf.scatter_sub()作用是:将ref中特定位置的数分别进行减法运算。示例如下:ref = tf.Variable([1, 2, 3, 4, 5, 6, 7, 8],dtype = tf.int32)indices = tf.constant([4, 3, 1, 7],dtype = tf.int32)updates = tf.constant([9, 10, 1原创 2018-02-02 18:05:12 · 5516 阅读 · 0 评论 -
人脸识别face recognition
0 简介人脸识别大致分为如下三个部分:人脸检测 face detection人脸对齐 face alignment人脸识别 face recognition,包括: face verification:两张图片相似程度。face identification: 在图片库中检索与当前图片相似度最高的图片。1 人脸检测face detection通常认为是在图片中找到人原创 2017-10-29 21:56:13 · 8059 阅读 · 0 评论 -
facenet-tensorflow人脸识别
项目地址:https://github.com/davidsandberg/facenetfacenet基于MTCNN的人脸检测和Inception-Resnet-v1的人脸识别网络softmax,center loss 训练结果比triplet loss训练结果好太多,自己训练达到99.0%+-0.006。利用msceleb训练集。一、MTCNN人脸检测待补充二、I原创 2017-12-27 10:53:53 · 6613 阅读 · 7 评论 -
tf.contrib.slim.conv2d 与 tf.nn.conv2d 区别
一般会import tf.contrib.slim as slimslim.conv2dslim.conv2d(inputs, num_outputs, kernel_size, stride = 1, padding = 'SAME')#其中kernel_size为int单个整数形式,一般为1或3,高与宽都是此数。tf.nn.conv2dtf.nn.conv2d(inputs, filter =原创 2017-12-29 17:56:02 · 1574 阅读 · 0 评论 -
tensorflow saver.restore()
加载pretrained_model模型-需要注意的是,tensorflow提供了下列函数,可以将pretrained_model设为文件夹,自动检查并加载上次save的ckpt文件。 - 下面是facenet训练时的加载上次模型的代码。需要在源代码中修改 saver = tf.train.Saver(tf.trainable_variables(), max_to_keep=3)原创 2018-01-14 16:55:30 · 6448 阅读 · 0 评论 -
tf.get_variable 和tf.variable_scope
http://blog.csdn.net/u012436149/article/details/53081454转载 2018-01-03 12:22:32 · 303 阅读 · 0 评论 -
Resnet-Tensorflow 在Mask-Rcnn 中的结构
阅读Mask-Rcnn代码时,观察resnet结构。 其中重要的有identity_block和conv_block。Identity Block:1*1,3*3,1*1的三层stride=(1,1)卷积,最后直接输出x+input作为输出。def identity_block(input_tensor, kernel_size, filters, stage, block,原创 2017-12-20 16:48:39 · 2045 阅读 · 1 评论 -
tensorflow-激活函数及tf.nn.dropout
激活函数激活函数(activation function)将神经元计算wTx+bw^Tx+b的结果经过非线性表达映射到下一层。需要可微,激活函数不会改变输入数据维度。sigmoid函数:σ(x)=11+e−x(1)\sigma(x)=\frac{1}{1+e^{-x}}\tag1 将输出映射到(0,1)内,缺点: 软饱和性:取值无穷大时,一阶导数趋于0,容易产生梯度消失。(硬饱和:某阶段一原创 2017-08-26 16:47:40 · 6732 阅读 · 0 评论 -
tensorflow-BatchNormalization(tf.nn.moments及tf.nn.batch_normalization)
批标准化批标准化(batch normalization,BN)一般用在激活函数之前,使结果x=Wx+bx=Wx+b 各个维度均值为0,方差为1。通过规范化让激活函数分布在线性区间,让每一层的输入有一个稳定的分布会有利于网络的训练。优点: 加大探索步长,加快收敛速度。更容易跳出局部极小。破坏原来的数据分布,一定程度上防止过拟合。解决收敛速度慢和梯度爆炸。tensorflow相应API原创 2017-08-26 10:24:40 · 15778 阅读 · 0 评论 -
tensorflow基础操作
基础操作import tensorflow as tf matrix1 = tf.constant([[3.,3.]])matrix2 = tf.constant([[2.],[5.]])product = tf.matmul(matrix1, matrix2)with tf.Session() as sess: result1 = sess.run(product) resul原创 2017-08-20 23:13:47 · 645 阅读 · 0 评论 -
win10+ubuntu16.04+cuda+opencv3.2+caffe(gpu)+tensorflow(gpu)
一、双系统:win10分盘: 安装ubuntu制作ubuntu系统启动u盘(略)插入制作好的ubuntu系统u盘:按下esc或f2或f11,进入: 此电脑硬盘128G+1T 选择最后一项:something else,手动分盘 分盘过程中,可都选择逻辑分区,此电脑需要添加一个use as EFI的分区才能正确分盘。 下一步 等待安装完成。原创 2018-02-06 13:42:08 · 675 阅读 · 0 评论