您的位置:首页 > Web前端

caffee learning notebook 1

2016-03-14 22:00 330 查看
reading the caffe tutorial and do some summary ,this will be my first step to the machine world.

some fundamental concepts

First:bolb:blob is a wrap of the data to be processed in the caffe network, some kind like the frame.the following are some kind of features of the blob.

1.the bolb is some kind like the frame in the computer system, it’s a kind of bag that stores the image brach ,model parameter or the derivatives of optimization.

2.the data in the blob is stored in the right-major order,whith means that the 4D array index (n, k, h, w) is physically located at index ((n * K + k) * H + h) * W + w, the rightmost will change fast.

3.in the image application, the dimension of the blob is usually four.

4.blob stores two differents kinds of data:the data and the diff,The former is the normal data that we pass along, and the latter is the gradient computed by the network.

5.some new idea about the bolb:if we imutate the frame in the computer network, we can wrap the operation information in the bolb,which may allow us broaden the defination and the customization the usage of the blob.

const Dtype* cpu_data const
Dtype mutable_cpu_data


layer computation

in the layer convolves the filter and the pool there are three critical computations:setup,forward and backword.

Net composition

the net are defined by the form of the text rather than the code ,this is the best advance of the caffee.There is a network and its defination.



the defination is followed here.

name: "LogReg"
layer {
name: "mnist"
type: "Data"
top: "data"
top: "label"
data_param {
source: "input_leveldb"
batch_size: 64
}
}
layer {
name: "ip"
type: "InnerProduct"
bottom: "data"
top: "ip"
inner_product_param {
num_output: 2
}
}
layer {
name: "loss"
type: "SoftmaxWithLoss"
bottom: "ip"
bottom: "label"
top: "loss"
}


the moeld intializaiton are achive by
Net::Init
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: