Coder Social home page Coder Social logo

qtool's Issues

DAIA

Thanks for your great paper on SR quantization. I have one problem about the method:

DAIA, Is there any other difference from LSQ expcept your first warm-up to initilize the step size?

or did you make specification of LSQ for SR task, thus you get your Distribution-Aware Interval Adaptation?

Biases and BatchNorm not quantized as described in "AQD: Towards Accurate Quantized Object Detection"

Rebasing the repo:

Import issuses from old url:

ShechemKS:

After reading the paper "AQD: Towards Accurate Quantized Object Detection", I have been using this repo to quantize an object detector. After reading the code, I realized that the biases of the convolutions (if it has biases) and batch normalization is not quantized. However, the paper "AQD: Towards Accurate Quantized Object Detection" states

We propose an Accurate Quantized object Detection (AQD) method to fully get rid of floating-point computation in each layer of the network, including convolutional layers, normalization layers and skip connections.

Specifically, I cannot find the code that corresponds to the equations given in section 3.2.2 of the paper. Am I missing something? How does that work in the code? Am I not using the correct keywords? (I have used the default ones provided: keyword: ["debug", "dorefa", "lsq"]). The biases don't seem to be quantized either.

Additionally, in the default configurations, the weights are quantized using the adaptive mode var-mean (i.e. the weights are normalized before being quantized, to my understanding). Is this also part of the method adopted in the paper, or should I disable this if I am to replicate those results?

AQD

I think i find a bug in model-quantization/task_cls.py: you shold add import utils or it will caused an NameError when i try to import my own pretrained model.

ADQ

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

loss become infinite while training quant models

hi, when i try to train a quant model using configdetectron2/configs/COCO-Detection/retinanet_R_18_FPN_1x-Full-SyncBN-lsq-2bit.yaml, and the loss became nan at iterations 390

-- Process 0 terminated with the following error:
Traceback (most recent call last):
  File "/home/zhangjinhe/anaconda3/envs/torch/lib/python3.7/site-packages/torch/multiprocessing/spawn.py", line 19, in _wrap
    fn(i, *args)
  File "/home/zhangjinhe/QTools/git/detectron2/detectron2/engine/launch.py", line 125, in _distributed_worker    main_func(*args)
  File "/home/zhangjinhe/QTools/git/detectron2/tools/train_net.py", line 154, in main
    return trainer.train()
  File "/home/zhangjinhe/QTools/git/detectron2/detectron2/engine/defaults.py", line 489, in train    super().train(self.start_iter, self.max_iter)
  File "/home/zhangjinhe/QTools/git/detectron2/detectron2/engine/train_loop.py", line 149, in train    self.run_step()  File "/home/zhangjinhe/QTools/git/detectron2/detectron2/engine/defaults.py", line 499, in run_step    self._trainer.run_step()  File "/home/zhangjinhe/QTools/git/detectron2/detectron2/engine/train_loop.py", line 289, in run_step    self._write_metrics(loss_dict, data_time)  File "/home/zhangjinhe/QTools/git/detectron2/detectron2/engine/train_loop.py", line 332, in _write_metrics
    f"Loss became infinite or NaN at iteration={self.iter}!\n"
FloatingPointError: Loss became infinite or NaN at iteration=390!

The commang i use is python tools/train_net.py --config-file configs/COCO-Detection/retinanet_R_18_FPN_1x-Full-SyncBN-lsq-2bit.yaml --num-gpus 4 MODEL.WEIGHTS output/coco-detection/retinanet_R_18_FPN_1x-Full_BN/model_final.pth

I change the input_size from (640, 672, 704, 736, 768, 800) to (800,) and the checkpoint file is the result of another experiment using config retinanet_R_18_FPN_1x-Full-BN.yaml

Any ideas why?

NameError: name 'task_cls' is not defined

When I run the code "python tools.py --keyword update,raw --mf weights/det-resnet18/mf.txt --mt weights/det-resnet18/mt.txt --old weights/pytorch-resnet18/resnet18-5c106cde.pth --new weights", I encounter the issue as follows:
image
How can I solve it?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.