DenseNetCaffe icon indicating copy to clipboard operation
DenseNetCaffe copied to clipboard

CaffeModel_Trained_on_ImageNet

Open 3DMM-ICME2023 opened this issue 8 years ago • 14 comments

Hi,Thanks for your sharing ! I noticed that your team have released the torch model trained on the ImageNet, Could you please release your caffe model trained on the ImageNet?

3DMM-ICME2023 avatar Dec 05 '16 12:12 3DMM-ICME2023

Thanks for your interest! Sorry we have no pre-trained models on ImageNet in caffe currently.

If you really want to use the models, maybe you can try to convert the torch model into caffe models by using https://github.com/facebook/fb-caffe-exts#torch2caffe . I tried but I didn't succeed.

We'll make the caffe pretrained models as soon as possible. Thanks

liuzhuang13 avatar Dec 05 '16 17:12 liuzhuang13

@liu666666 Hi, have you succeeded on transferring the trained caffe model from torch version? Thank you!

sunformoon avatar Dec 14 '16 06:12 sunformoon

No, sorry.

3DMM-ICME2023 avatar Dec 14 '16 06:12 3DMM-ICME2023

Liu,

Are imagenet of solver,prototxt, train_densenet.prototxt and test_densenet.prototxt available?

Thanks,

kaishijeng avatar Jan 06 '17 07:01 kaishijeng

@kaishijeng Here are the solver.prototxt and train_val_densenet.prototxt files for densenet_121. I think you can use them to train caffe models on ImageNet without any modification. @liu666666 @sunformoon Now I work with liuzhuang13, we will release the pre-trained caffe models soon. densenet_121.zip

szq0214 avatar Jan 15 '17 11:01 szq0214

Thanks and will try it

kaishijeng avatar Jan 15 '17 18:01 kaishijeng

@sunformoon @liu666666 @kaishijeng Sorry for the late response. Our pretrained DenseNet-121 and prototxt in Caffe has just been released here https://github.com/liuzhuang13/DenseNet#imagenet-and-pretrained-models

Thanks for your interest!

liuzhuang13 avatar Feb 11 '17 17:02 liuzhuang13

Hi, could you share the solver and train prototxt files of Densenet(L=40, K=12) for training cifar100, I have found these files for cifar10, training the same for cifar100 have given me low accuracies. Thanks!!

saiguruju avatar Mar 03 '17 17:03 saiguruju

@saiguruju Thanks for your interest. Sorry we didn't test this caffe code for cifar100, but in our original experiment on paper, we use exactly the same setting as cifar10 when training on cifar 100.

I've heard other people also report the lower accuracy of cifar100 using caffe than reported on our paper, but sorry I don't know the reasons either. Possibly the difference in accuracy from our original paper is due to some internal differences between Torch and caffe. This is also the case for ImageNet dataset, see our discussion here https://github.com/liuzhuang13/DenseNet/issues/10

liuzhuang13 avatar Mar 03 '17 18:03 liuzhuang13

By same setting, you mean that prototxt files (solver and train) will be same, and accuracy might be little less. I have only trained for 20000 iterations for same setting with hingeloss(L2) on cifar100, accuracy went up to 0.05, should I train upto 230000 and observe? I just wanted to know if its getting trained in the right way.

Thanks for prompt reply!

saiguruju avatar Mar 03 '17 18:03 saiguruju

@saiguruju The solver should be the same, but at least you should modify the train.prototxt to 100 classes instead of 10.

If you only get an accuracy of 0.05 after 20k iterations, there ought to be bugs in your code... I think at least you should get 60% accuracy if there are no bugs, even where there is no data augmentation.

liuzhuang13 avatar Mar 03 '17 18:03 liuzhuang13

I did have 100 classes. It is possible that my code has gone wrong somewhere! Thank you!

saiguruju avatar Mar 03 '17 18:03 saiguruju

@saiguruju We used softmax loss throughout the work, maybe the problem is your L2 loss. This is just my guess

liuzhuang13 avatar Mar 03 '17 18:03 liuzhuang13

@liuzhuang13 Thanks! It worked the way you predicted with softmax, there is some problem with L2 loss.

saiguruju avatar Mar 04 '17 09:03 saiguruju