-
Couldn't load subscription status.
- Fork 61
Winograd Layer in Skim Caffe #15
Description
Please use the caffe-users list for usage, installation, or modeling questions, or other requests for help.
Do not post such requests to Issues. Doing so interferes with the development of Caffe.
Please read the guidelines for contributing before submitting this issue.
Issue summary
Hello, I am new to Caffe and deep learning in general, and am hoping to find some answers here :)
I have installed SkimCaffe on my Ubuntu VM and am able to run classification models using Lenet. Now, I want to switch the convolution layer to winograd convolution layer, and perform comparative study between the two types of convolutions.
I have tried to add it as below, however this has not been successful. The winograd layer addition just zeros all entries in the matrix and gives wrong classifications (refer below). I believe I must be doing something wrong here. I would greatly appreciate if someone could guide me to the solution.
Basically, I want to add a Winograd Layer (winograd convolution) into Lenet, using winograd_layer.cpp.
Thank you for the help! Also, please let me know where I could ask this question, if this is not the right platform for it :)
LENET:
layer {
name: "train-data"
type: "Data"
top: "data"
top: "label"
include {
phase: TRAIN
}
transform_param {
mean_file: "/home/x/DIGITS/digits/jobs/20180302-235120-dbc4/mean.binaryproto"
}
data_param {
source: "/home/x/DIGITS/digits/jobs/20180302-235120-dbc4/train_db"
batch_size: 64
backend: LMDB
}
}
layer {
name: "val-data"
type: "Data"
top: "data"
top: "label"
include {
phase: TEST
}
transform_param {
mean_file: "/home/x/DIGITS/digits/jobs/20180302-235120-dbc4/mean.binaryproto"
}
data_param {
source: "/home/x/DIGITS/digits/jobs/20180302-235120-dbc4/val_db"
batch_size: 32
backend: LMDB
}
}
layer {
name: "scale"
type: "Power"
bottom: "data"
top: "scaled"
power_param {
scale: 0.0125000001863
}
}
layer {
name: "win1"
type: "Winograd"
bottom: "scaled"
top: "win1"
param {
lr_mult: 1.0
}
param {
lr_mult: 2.0
}
convolution_param {
num_output: 20
kernel_size: 5
stride: 1
}
}
layer {
name: "pool1"
type: "Pooling"
bottom: "win1"
top: "pool1"
pooling_param {
pool: MAX
kernel_size: 2
stride: 2
}
}
layer {
name: "win2"
type: "Winograd"
bottom: "pool1"
top: "win2"
param {
lr_mult: 1.0
}
param {
lr_mult: 2.0
}
convolution_param {
num_output: 50
kernel_size: 5
stride: 1
}
}
layer {
name: "pool2"
type: "Pooling"
bottom: "win2"
top: "pool2"
pooling_param {
pool: MAX
kernel_size: 2
stride: 2
}
}
layer {
name: "ip1"
type: "InnerProduct"
bottom: "pool2"
top: "ip1"
param {
lr_mult: 1.0
}
param {
lr_mult: 2.0
}
inner_product_param {
num_output: 500
weight_filler {
type: "xavier"
}
bias_filler {
type: "constant"
}
}
}
layer {
name: "relu1"
type: "ReLU"
bottom: "ip1"
top: "ip1"
}
layer {
name: "ip2"
type: "InnerProduct"
bottom: "ip1"
top: "ip2"
param {
lr_mult: 1.0
}
param {
lr_mult: 2.0
}
inner_product_param {
num_output: 10
weight_filler {
type: "xavier"
}
bias_filler {
type: "constant"
}
}
}
layer {
name: "accuracy"
type: "Accuracy"
bottom: "ip2"
bottom: "label"
top: "accuracy"
include {
phase: TEST
}
}
layer {
name: "loss"
type: "SoftmaxWithLoss"
bottom: "ip2"
bottom: "label"
top: "loss"
}
