convNet.pytorch icon indicating copy to clipboard operation
convNet.pytorch copied to clipboard

Quantizing Mobilenet

Open skvenka5 opened this issue 7 years ago • 1 comments

I am trying to quantize mobilenet model in the same how you have implemented resnet (https://github.com/eladhoffer/convNet.pytorch). To accomplish this I added the following lines in models/mobilenet .py

from .modules.quantize import QConv2d, QLinear, RangeBN torch.nn.Linear = QLinear torch.nn.Conv2d = QConv2d torch.nn.BatchNorm2d = RangeBN

But, on training the loss is going to nan. It will be of great help if you could provide some inputs on this.

Thanks in advance

regards Shreyas

skvenka5 avatar Apr 20 '19 02:04 skvenka5

Quantizing on ResNet-18 also goes NaN

talenz avatar Aug 28 '19 08:08 talenz