Caffe_VisionLayer

1. Convolution Layer - convolves the input image with a set
of learnable filters, each producing one feature map in the
output image.

默認類型爲 constant, 更詳細的介紹見 include/caffe/filter.hpp
2. Pooling Layer - max, average, or stochastic pooling.

3. Spatial Pyramid Pooling (SPP)

4. Crop - perform cropping transformation.
Parameters
Parameters (CropParameter crop_param)
From ./src/caffe/proto/caffe.proto):
message CropParameter {
optional int32 axis = 1 [default = 2];
repeated uint32 offset = 2;
} e
xample:
layer {
name: "crop_layer"
type: "Crop"

bottom: "A"
bottom: "B"
top: "C"
crop_param {
axis: 1
blob)
offset: 25
offset: 128
# 待裁剪的
# 參考裁剪
# 最終得到的裁剪後的
# 表示從軸1到後面軸開始此裁剪(四維

offset: 128
}
} 解
釋說明:
Caffe中的數據是以 blobs形式存在的,blob是四維數據,即 (Batch size, number of
Chennels, Height, Width)=(N, C, H, W)。­­­(0,1,2,3)
Crop層的輸入(bottom blobs)有兩個,讓我們假設爲A和B,輸出(top)爲C。
A是要進行裁切的bottom,他的size是 (20,50,512,512)
B是裁切的參考輸入,他的size是(20,10,256,256)
C是輸出(top blob),由A裁切而來,那麼他的size是(20,10,256,256)
在這個例子中,軸0的維度不變,我們只需要裁切blob的軸1,2,3,所以我們設置
axis=1,代表我們將會裁切軸1和它之後的所有軸。
有兩個裁切模式:
模式1­­­給出3個offsets,每個針對一個dimension,offset=(25,128,128)
axis=1,offset=(25,128,128)
crop operation: C = A[: , 25: 25+B.shape[1] , 128:
128+B.shape[2] , 128: 128+B.shape[3] ]
也就是說,對於A的軸1,對稱裁切了25­35
對稱裁切:offset = (Original_length ­ desired length ) / 2
模式2­­­給出1個offset,適用於三個dimension,offset=25
那麼就相當於模式1 的 offset=(25,25,25)
5. Deconvolution Layer - transposed convolution.
6. Im2Col - relic helper layer that is not used much anymore.

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章