caffe
奋斗啊哈
每篇博文都有待完善,不足之处请各位多多指教!
展开
-
caffe 使用笔记
caffe中的输入数据格式为:高效数据库(LevelDB、LMDB)、内存、磁盘文件(HDF5、图像)。对输入数据的处理包括mean subtraction, scaling, random cropping, and mirroring,可以在TransformationParameters中设置。1 转换自己的数据转为LMDB需要OpenCV,所以Makefile.config文件中的USE_O原创 2016-03-10 15:00:31 · 3538 阅读 · 1 评论 -
caffe的可视化
网络模型可视化训练模型python ~/caffe-master/python/draw_net.py ~/caffe-master/examples/mnist/mnist_autoencoder.prototxt mnist_autoencoder.png生成的图片如下:原创 2016-03-20 15:14:04 · 788 阅读 · 0 评论 -
caffe之 Blob、Layer、Net
Blobshare_ptr<Blob<float> > b;Blob<float> bf=*b;//Error,'='操作是Blob私有的LayerNet首先从初始化一个netparameter对象说起,对应caffe.proto中的message为NetParameter。原创 2016-11-24 22:12:28 · 544 阅读 · 0 评论 -
caffe dataset
lmdb操作lmdb数据库import numpy as npimport lmdbN=10map_size = 10485760#map_size:max size (bytes) the database may grow to.#If database grows lager than map_size,an exception will be raised#On 64-bit th原创 2016-05-11 10:49:47 · 881 阅读 · 0 评论 -
Caffe安装笔记
本文记录了两种情况下的Caffe 安装,一是在已经装了Centos和cuda的机器上安装,二是从裸机开始。前者由于各个软件版本兼容问题出错较多,后者则相当顺利。安装1系统环境CentOS release 6.4 (Final) gcc 版本 4.4.7 20120313 (Red Hat 4.4.7-16) (GCC) cuda-5.5必要项安装按照官网步骤进行安装,安装中卡的时间比较长的一个原创 2016-01-17 16:18:52 · 10846 阅读 · 0 评论 -
caffe 预测
使用caffemodel做预测C++ APIsudo ../../build/examples/cpp_classification/classification.bin VGG_FACE_deploy.prototxt VGG_FACE.caffemodel ../../data/ilsvrc12/imagenet_mean.binaryproto names.txt ak.png详细见官网原创 2016-09-10 12:55:51 · 501 阅读 · 0 评论 -
Caffe 数据结构
Layer五大类Data Layers、Vision Layers、Common Layers、Activation Neuron Layers、Loss Layers核心类NetParameter.caffemodel文件中存储的数据结构对应一个NetParameter 类 部分成员函数name()#获取网络的名字layer_size()#获取网络层数mutable_layer()#获取网络原创 2016-03-17 11:54:31 · 300 阅读 · 0 评论 -
caffe优化方法
caffe中的solver负责处理模型优化过程,通过网络前向传播产生的loss和后向传播产生的梯度进行模型优化(更新模型中的权重)来降低loss. caffe中的solver有:Stochastic Gradient Descent (type: “SGD”)AdaDelta (type:”AdaDelta”)Adaptive Gradient (type: “AdaGrad”)Adam原创 2016-05-08 15:05:49 · 1424 阅读 · 0 评论 -
caffe中的 AlexNet,LeNet,CaffeNet
AlexNet LeNet caffenet CaffeNetConv原创 2016-05-13 09:12:36 · 3228 阅读 · 0 评论 -
caffe 中的超参
weight_decayweight_decay是权重(weight,bias)惩罚的系数,是caffe进行模型正则化的方法。caffe的惩罚项可以在 ‘L1’和 ‘L2’ 中选择,默认的惩罚项为 ‘L2’,可以在相应的solver.prototxt文件中更改为L1:regularization_type: "L1"因为L1比L2取值要大,所以更改为L1时weight_decay要相应减小。Xavi原创 2016-05-18 23:50:28 · 1145 阅读 · 0 评论 -
caffe loss layer
classification SoftmaxWithLoss HingeLossLinear Regression EuclideanLoss:多用在线性回归中,利用的损失函数是均方误差:l=(y−f(wx→))l=(y-f(w\overrightarrow x))Attributes / Multiclassification SigmoidCrossEntropyLoss:多用于逻辑回归原创 2016-05-16 11:13:52 · 391 阅读 · 0 评论 -
googleNet
googleNet Are right-aligned原创 2016-05-13 09:55:10 · 636 阅读 · 0 评论 -
caffe MNISTAutoencoder
MNISTAutoencoder LogisticRegressionNet LogisticRegressionNet2 R-CNN-ilsvrc13原创 2016-05-13 09:01:28 · 2148 阅读 · 1 评论 -
caffe cifar10 net笔记
cifar10 CIFAR10_full CIFAR10_full_deploy CIFAR10_quick CIFAR10_quick_test 其中CIFAR10的full、quick版本的区别在于前者有局部区域正则化层(Local Response Normalization),将每一个输入值做正则化。caffe tutorial的解释如下:原创 2016-05-11 10:30:50 · 942 阅读 · 0 评论 -
caffe模型训练
#include <Python.h> // NOLINT(build/include_alpha)// Produce deprecation warnings (needs to come before arrayobject.h inclusion).#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION#include <boost/make_原创 2016-03-21 23:15:27 · 868 阅读 · 0 评论