Zero accuracy training a neural network using caffe

42 views
Skip to first unread message

Sharp Weapon

unread,
Nov 1, 2016, 5:15:06 PM11/1/16
to Caffe Users

I am training a network which has a constant 0 accuracy, I know the network is not learning. I tried different batch sizes and learning rates, It didn't help. What could possibly go wrong given the network prototxt and solver shown below? Thanks!

layer {
name: "data"
type: "HDF5Data"
top: "X"
top: "y"
hdf5_data_param{
source:"/A/B/trainlist.txt"
batch_size: 1
}
include{phase: TRAIN}
}
layer {
name: "data"
type: "HDF5Data"
top: "X"
top: "y"
hdf5_data_param{
source:"/A/B/testlist.txt"
batch_size: 1
}
include{phase: TEST}
}

Here is the solver.prototxt

net: "/A/B/train.prototxt"
test_iter: 10
test_interval: 1000
base_lr: 0.01
lr_policy: "step"
gamma: 0.1
stepsize: 1000
display: 10
max_iter: 4000
momentum: 0.9
weight_decay: 0.0005
snapshot: 1000
snapshot_prefix: "/A/B/model_"
solver_mode: GPU

Wilf Rosenbaum

unread,
Nov 2, 2016, 10:07:29 AM11/2/16
to Caffe Users
You have only defined the input layer. You have to define a loss layer and optionally some computational layers. You haven't created anything to learn.

Sharp Weapon

unread,
Nov 2, 2016, 7:12:23 PM11/2/16
to Caffe Users
I showed part of my network, the data layer. I have all the layers I needed in my prototxt. I just shared the data layer thinking the issue might be related to that part of the network.

Wilf Rosenbaum

unread,
Nov 2, 2016, 11:07:57 PM11/2/16
to Caffe Users
Oh, ok, in that case the best thing you should check is
Reply all
Reply to author
Forward
0 new messages