yahoo / open_nsfw

Not Suitable for Work (NSFW) classification using deep neural network Caffe models.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

train_val.prototxt file for fine-tuning

michaelholm-ce opened this issue · comments

Hello. Thank you for sharing this project. The readme suggests fine-tuning for improved performance, and I'm writing to request direction on how to convert the deploy.prototxt file into a train_val.prototxt file for fine-tuning. Or, more simply, to request a sample train_val.prototxt file.

Thank you.

@michaelholm-ce the train and test prototxts were generated using pynetbuilder. Example the thin resnet prototxts for training on imagenet can be found here You can modify the FC1000 layer and replace it with fc_nsfw layer. Rest I believe everything should remain same.

Thank you @jay-mahadeokar. Will you please share good candidate hyperparameters for training (e.g. solver.prototxt)? I have tried many combinations through Nvidia Digits, so far to no avail with this model architecture.

I took a stab at creating the train_val.prototxt as per @jay-mahadeokar 's instructions: https://gist.github.com/ProGamerGov/2dedda3ad769fbe322e9b5db63db7763

Curious to see how it work with https://github.com/jcjohnson/fast-neural-style.

I have implemented a similar train_val.prototxt file, but (via Nvidia DIGITS), the model will not learn (on a data set that Alexnet and Googlenet easily learn on), in spite of lowering learning rates and increasing batch sizes. Any suggestions are appreciated. Dataset is 1 million images for each of two classes, and I am using 4 TitanX GPUs.

I would suggest experimenting with hyper parameters for best results. Following could be a good starting point (these are for finetuning the network):

base_lr: 0.001
lr_policy: "step"
stepsize: [5 epochs?, could be again tuned]  
gamma: 0.5