ziplab / QTool

Collections of model quantization algorithms. Any issues, please contact Peng Chen (blueardour@gmail.com)
Other
68 stars 16 forks source link

ADQ #3

Open CY-GAO222 opened 3 years ago

CY-GAO222 commented 3 years ago

I haven’t found the ADQ method related code in the project. Haven’t I uploaded it yet?

liujingcs commented 3 years ago

Hi, we have released the code and pre-trained models.

  1. For the corresponding instructions, you might refer to https://github.com/MonashAI/QTool/blob/master/doc/detectron2.md.
  2. For the quantization function, you might refer to https://github.com/aim-uofa/model-quantization/blob/74115eaf33668207124254f2b2145209f7ab70fe/models/quant.py#L535.
  3. For the Multi-level BatchNorm, you might refer to https://github.com/blueardour/AdelaiDet/blob/5acafcc38a03b097cafd2b5a78bf9607c3c3cfaa/adet/modeling/fcos/fcos.py#L165.
CY-GAO222 commented 3 years ago

Hi, we have released the code and pre-trained models.

  1. For the corresponding instructions, you might refer to https://github.com/MonashAI/QTool/blob/master/doc/detectron2.md.
  2. For the quantization function, you might refer to https://github.com/aim-uofa/model-quantization/blob/74115eaf33668207124254f2b2145209f7ab70fe/models/quant.py#L535.
  3. For the Multi-level BatchNorm, you might refer to https://github.com/blueardour/AdelaiDet/blob/5acafcc38a03b097cafd2b5a78bf9607c3c3cfaa/adet/modeling/fcos/fcos.py#L165.

Hello, I've sorted out the links you sent me. The first link is detectron2, which is used as a toolbox for target detection. The second link quantization method, I have a look. There are three quantization methods, LQ net, dorefa and XNOR. However, the quantization used in ADQ is LSQ method, which does not mention LSQ method. I don't understand the code in the third link. Is this the deployment and application of multi-level BN in ADQ on fcos?

你好,我大概整理了一下您发我的链接,第一个链接是detectron2,作为目标检测的工具箱使用。第二个链接时量化方法,我看了一下,里面有三个量化方法,分别是LQ-Net、dorefa和xnor,但是ADQ里面使用的量化是LSQ的方法,这里面没有提及LSQ的方法。第三个链接里面的代码我没看懂,这是把ADQ里面的multi-level BN部署应用在FCOS上吗?

liujingcs commented 3 years ago
  1. Yes. We have changed some codes based on detectron2.
  2. We have included LSQ in line 535 of the corresponding link.
  3. Yes. Given n levels, we create n BN/Sync BN layers.
Janspiry commented 2 years ago

Hi, thanks for this awesome work. I have some questions:

  1. Can you give the pretrain model link about ADQ? I just find LSQ model in google drive.
  2. From the above conversation, I understand that the method modules of ADQ are in fragmented parts in different frameworks. Is there a config file about its complete training?
  3. Like #1 , Is there the permalink of code about some fixed-point computation, e.g. normalization?

Thank you again for your nice work!