Accuracy reported by caffe and pycaffe are different

后端 未结 1 573
广开言路
广开言路 2020-12-07 05:20

Below is the train.Prototxt file that is used to train a pretrained model.

    name: \"TempWLDNET\"
    layer {
      name: \"data\"
      type: \"ImageData\         


        
相关标签:
1条回答
  • 2020-12-07 05:49

    There are differences between your validation step (TEST phase) and the python code you are running:

    1. You are using a different mean file for train and test (!): for phase: TRAIN you are using mean_file: "mean.binaryproto" while for phase: TEST you are using mean_file: "painmean.binaryproto". Your python evaluation code uses the training mean file and not the validation.
      It is not a good practice to have different settings for train/validation.

    2. Your input images have new_height: 256 and copr_size: 224. This settings means caffe reads the image, scales it to 256x256 and then crops the center to size 224x224. Your python code seems to only scale the input to 224x224 without cropping: you feed your net with different inputs.

    3. Please verify that you do not have any other differences between your training prototxt and deploy prototxt.

    0 讨论(0)
提交回复
热议问题