loadcaffe icon indicating copy to clipboard operation
loadcaffe copied to clipboard

Support batch normalization

Open daylen opened this issue 9 years ago • 15 comments

Batch Normalization was added to Caffe in October 2015. (See https://github.com/BVLC/caffe/pull/3229 and https://github.com/BVLC/caffe/pull/3299). The caffe.proto file in this repo is from April 2015, so it doesn't know about Batch Normalization and can't load newer model definition files.

daylen avatar Apr 12 '16 23:04 daylen

thanks, are there models in caffe format with batchnorm available? should be quick to add, just need a test. resnets won't work.

szagoruyko avatar Apr 13 '16 08:04 szagoruyko

@szagoruyko You're saying that you cannot use resnets for this test, or you're saying resnets won't work till you get this test working?

ghost avatar Apr 17 '16 20:04 ghost

@joshpowell resnets have non-sequential structure which loadcaffe doesn't support now

szagoruyko avatar May 04 '16 13:05 szagoruyko

@joshpowell you might want to give [caffegraph](https://github.com/nhynes/caffegraph) a try. It's not yet as fully featured as loadcaffe (it's missing a few modules), but it will load your resnet just fine.

nhynes avatar Aug 10 '16 16:08 nhynes

Hi, could loadcaffe load models in caffe format with batch normalization,now?

wuhuo714 avatar Oct 10 '16 13:10 wuhuo714

@wuhuo714 no

szagoruyko avatar Oct 10 '16 17:10 szagoruyko

@szagoruyko Will batchnorm be available soon?

wuhuo714 avatar Oct 11 '16 01:10 wuhuo714

@wuhuo714 don't have time unfortunately

szagoruyko avatar Oct 11 '16 08:10 szagoruyko

@szagoruyko Thanks a lot,anyway!

wuhuo714 avatar Oct 11 '16 12:10 wuhuo714

Hi,@szagoruyko,if my caffemodel has batchnorm layers which loadcaffe can not recognize, can the following layers like Relu get its correponding weights?It has confused me a lot.

wuhuo714 avatar Oct 22 '16 03:10 wuhuo714

@wuhuo714 no, it will ignore layers it can't recognize

szagoruyko avatar Oct 22 '16 11:10 szagoruyko

Although the layers it can't recognize are ignored, will the weights of these unrecognizable layers be used in the following layers it recoginze? Is that the reason why the following layers like conv can not get their corresponding weights?

wuhuo714 avatar Oct 23 '16 09:10 wuhuo714

@wuhuo714 weights of unrecognized layers will not be loaded at all

szagoruyko avatar Oct 23 '16 12:10 szagoruyko

@szagoruyko ok, it's very kind of you to answer my doubts!

wuhuo714 avatar Oct 24 '16 01:10 wuhuo714

Hi @szagoruyko, First thank you for your work, your package is very useful for me (and probably for lot of peoples). I'm also interested by loading a caffe model with batch normalization. Is it still not available ?

Fourure avatar Jan 12 '17 16:01 Fourure