0

I have tried to train mobilenetV2 with cifar10 dataset as mentioned in https://github.com/tensorflow/models/tree/master/research/slim only change was I did it on CPU but i ended getting only 63% accuracy but the stated accuracy is 94%

DATASET_DIR=/tmp/cifar10
TRAIN_DIR=/tmp/train_logs
python train_image_classifier.py \
--train_dir=${TRAIN_DIR} \
--dataset_name=cifar10 \
--dataset_split_name=train \
--dataset_dir=${DATASET_DIR} \
--model_name=mobilenet_v2 \
--clone_cpu=True
Akash Bhogar
  • 1
  • 1
  • 1

2 Answers2

0

Out of curiosity, which stated accuracy you are referring to?

All these networks to train well without changing on Cifar10 require upsampling Cifar10 to 224x224 (or similar) resolution. There should be a flag for that in train_image_classifier.

  • https://github.com/kuangliu/pytorch-cifar/issues/29 referring this page , According to the training steps specified in the github link i specified in the que (tf slim model) they havent done any upscalling their is Flag for image size which i have changed to 32 as per cifar10 dataset – Akash Bhogar Oct 10 '19 at 05:11
  • I think they are doing another hack, where they set first two layers strides to 1 . For instance see https://github.com/kuangliu/pytorch-cifar/blob/master/models/mobilenetv2.py#L43 which does have the same effect. The problem is if the input resolution is low and strides are kept, the model degenerates to a bunch of fully connected layers and overfits like crazy. – Mark Sandler Oct 11 '19 at 06:52
  • Ya Got it But Their are many more references that State Higher Accuracy – Akash Bhogar Oct 11 '19 at 19:04
0

Tq @Mark Sandler The hack they did was correct I got about 93% Accuracy by Changing the strides of first 3 layers to 1 among total of 5 layers with Stride 2enter image description here

The File Link is : https://github.com/tensorflow/models/blob/master/research/slim/nets/mobilenet/mobilenet_v2.py

Akash Bhogar
  • 1
  • 1
  • 1