Why does the different result come out between Caffe and CNTK with Resnet??

16 views
Skip to first unread message

YiKo

unread,
Mar 17, 2017, 12:40:09 AM3/17/17
to Caffe Users
I'm trying to use the caffe.

but i have got a problem.

when i tested with CNTK, i got a result of 99% Accuracy.
but when i tested with Caffe, i get a 27% Accuracy.

both of that are tested with same images.

1. OS : windows 7
2. file format is gray scale bmp file.
3. image size : 224 x 224
4. Train/Test data (2 classes)
 1) Train : 2,000 samples
 2) Test : 4,000 samples

[CNTK-Information]

### CNTK-SGD ###
    SGD=[ 
        epochSize=0 
        minibatchSize=16 
       learningRatesPerMB=0.1*15:0.05*15:0.01*15:0.001 
       momentumPerMB=0.9 
       maxEpochs=60 
       gradUpdateType="None" 
       L2RegWeight=0.0001 
       dropoutRate=0 
        
       ParallelTrain=[ 
           parallelizationMethod="DataParallelSGD" 
           distributedMBReading="true" 
           parallelizationStartEpoch=1 
           DataParallelSGD=[ 
               gradientBits=32 
           ] 
       ] 
   ] 

i have 3,000 data for training
and set the max Epochs 60,
3,000 * 60 => 180,000 data is used for training

so I set the caffe parameter like below,
max_iter : 3000 and batch size 64
3,000 * 60 => 180,000 data is used for training

and base_lr: 0.1 (such as CNTK's starting learningRatesPerMB=0.1*15:0.05*15:0.01*15:0.001)

but... 

[Caffe-Information]

#### Caffe-solver ####
display: 30
base_lr: 0.1
lr_policy: "multistep"
stepvalue: 3000
stepvalue: 6000
stepvalue: 8000
stepvalue: 10000
gamma: 0.5
max_iter: 11250
momentum: 0.9
weight_decay: 0.0001
snapshot: 1000
solver_mode: GPU

#### Caffe-prototxt ####
image_data_param {
        source: "Train.txt" <- list of bmp files (gray scale)
        batch_size: 16
is_color: false
shuffle: true
}

what should i do for getting similar result to the CNTK.
Reply all
Reply to author
Forward
0 new messages