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

Support act_bit/weight_bit values that are not powers of two. #37

Closed analog-cbarber closed 5 years ago

analog-cbarber commented 6 years ago

Currently, act_bit and weight_bit parameters may only be powers of two (1,2,4,8,16,32). Apart from the fact that other values will not evenly divide 64, there is no reason you could not support other values. Indeed, those interested in modeling possible ASIC/FPGA architectures aren't going to want to be limited to powers of two.

Obviously, this would require a little bit of work to figure out the bit-packing scheme and mask out unused bits.