hpi-xnor / BMXNet

(New version is out: https://github.com/hpi-xnor/BMXNet-v2) BMXNet: An Open-Source Binary Neural Network Implementation Based on MXNet
Apache License 2.0
349 stars 95 forks source link

Resnet-binary not working on 32 bit system #23

Closed ahuynh227 closed 6 years ago

ahuynh227 commented 6 years ago

I used resnet-binary symbol to train on 224x224 images, converted the model and tried the inference on multiple systems. The model works fine on 64 bit system but gives the same prediction score for all the samples tested on 32 bit. I was wondering what the differences are between 64 and 32 and if there is anything I can do to fix that? Thanks in advance!

yanghaojin commented 6 years ago

congras that it works for 64bit :-). for 32bit you dont need to retrain the model, but recompile bmxnet with setting the cmake option BINARY_WORD_TYPE to uint32. then run the model converter to create a 32bit model, use it for 32bit devices. The difference between 32 and 64bit is which container (uint32 or uint64) we use to store the weights,and how we concatinate the weights.

ahuynh227 commented 6 years ago

Recompiled the code and got it working. Thanks for your help!