GithubHelp home page GithubHelp logo

Fail to Run TVM tests about hawq HOT 4 OPEN

sqPoseidon avatar sqPoseidon commented on August 26, 2024
Fail to Run TVM tests

from hawq.

Comments (4)

zachzzc avatar zachzzc commented on August 26, 2024

Hi,

  1. Can you share you error messages for the dictionary? We will check again and upload the correct version

  2. The input_image_batch_1.npy is here https://github.com/Zhen-Dong/HAWQ/tree/main/tvm_benchmark/models

  3. The numpy error should be caused by the numpy version. What is the version of you numpy? I see 1.2.1 should still have this function defined.

from hawq.

sqPoseidon avatar sqPoseidon commented on August 26, 2024

Hi,

  1. Can you share you error messages for the dictionary? We will check again and upload the correct version
  2. The input_image_batch_1.npy is here https://github.com/Zhen-Dong/HAWQ/tree/main/tvm_benchmark/models
  3. The numpy error should be caused by the numpy version. What is the version of you numpy? I see 1.2.1 should still have this function defined.

Hi, thank you for the quick reply. Maybe I've tried the error commands or used the wrong files. It's my pleasure if you can help figure out the problems.

  1. I've tried to run python hawq_utils_resnet50.py --model-dir ./data. Two models are tested: ResNet50 W8A8 (https://drive.google.com/file/d/1Ldo51ZPx6_2Eq60JgbL6hdPdQf5WbRf9/view?usp=sharing) and ResNet50 W4A4 (https://drive.google.com/file/d/1DDis-8C-EupCRj-ExH58ldSv-tG2RXyf/view?usp=sharing). Both these two tests report the error message:
  File "hawq_utils_resnet50.py", line 479, in <module>
    model = torch.load(file_name)
  File "xxx/site-packages/torch/serialization.py", line 579, in load
    with _open_file_like(f, 'rb') as opened_file:
  File "xxx/site-packages/torch/serialization.py", line 230, in _open_file_like
    return _open_file(name_or_buffer, mode)
  File "xxx/site-packages/torch/serialization.py", line 211, in __init__
    super(_open_file, self).__init__(open(name, mode))
FileNotFoundError: [Errno 2] No such file or directory: 'xxx/quantized_checkpoint.pth.tar'

There are no quantized_checkpoint.pth.tar files in the provided download links.
Then I tried to use the ResNet18 model (https://drive.google.com/file/d/1CLAd3LhiRVYwiBZRuUJgrzrrPFfLvfWG/view?usp=sharing), the problem is there are no qconfig modules in the model. I'm not sure whether these items are important and whether we can reproduce the results while ignoring these items (#10 (comment)).

Or should I follow the guides to generate the quantized models by myself?

  1. My numpy version is 1.19.1. Do I need to downgrade the numpy?

from hawq.

zachzzc avatar zachzzc commented on August 26, 2024
  1. I think the quantized_checkpoint got renamed for some reasons.... You can extract the zipped file and rename it quantized_checkpoint.pth.tar from checkpoint.pth.tar

  2. I realized the problem may not be caused by the version but the image data. Can you try to use the image I provided? If the image.npy you generated is type of integer, it may causes an error.

from hawq.

mu94-csl avatar mu94-csl commented on August 26, 2024

@zachzzc no, the quantized_checkpoint are not present for most models in the zoo

One has to extract the quantized weights themselves using torch (#13 (comment))

For how to do this, please see the validate function in the quant train file

from hawq.

Related Issues (20)

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.