Giter VIP home page Giter VIP logo

Comments (4)

vtddggg avatar vtddggg commented on May 21, 2024

Sorry for the inconvenient.

We have provided a DockerFile which contains our running environment.

By the way, can you provide some more information about which checkpoints you want to load and which script you run. Such that we can reproduce the error to check if it is a bug need to be fixed.

Thanks!!

from easyrobust.

EnesAltinisik avatar EnesAltinisik commented on May 21, 2024

Because of my working environment, I can not run the docker image. (I tried the same configuration with conda)

I got errors for all checkpoints in the adversarial training benchmark:

Creating model: vit_base_patch16_224
Traceback (most recent call last):
File "benchmarks/benchmark.py", line 137, in
main()
File "benchmarks/benchmark.py", line 84, in main
ckpt = model_zoo.load_url(args.ckpt_path)
File ".............../anaconda3/envs/easyRob/lib/python3.7/site-packages/torch/hub.py", line 528, in load_state_dict_from_url
return torch.load(cached_file, map_location=map_location)
File ".............../anaconda3/envs/easyRob/lib/python3.7/site-packages/torch/serialization.py", line 585, in load
with _open_zipfile_reader(opened_file) as opened_zipfile:
File "................../anaconda3/envs/easyRob/lib/python3.7/site-packages/torch/serialization.py", line 242, in init
super(_open_zipfile_reader, self).init(torch._C.PyTorchFileReader(name_or_buffer))
RuntimeError: [enforce fail at inline_container.cc:145] . PytorchStreamReader failed reading zip archive: failed finding central directory

from easyrobust.

vtddggg avatar vtddggg commented on May 21, 2024

I run the follow command:

python benchmarks/benchmark.py --adv --model vit_base_patch16_224 --ckpt_path http://alisec-competition.oss-cn-shanghai.aliyuncs.com/xiaofeng/imagenet_pretrained_models/advtrain_models/advtrain_vit_base_patch16_224_ep4.pth

and the weight is loaded successfully for me.

Here is the possible solution for your case. Could you please run md5sum advtrain_vit_base_patch16_224_ep4.pth to check if the weight is fully download? For correct checkpoint, the md5 value should be 3da2ce407c9e84b6c3acd93eccb1f592

from easyrobust.

EnesAltinisik avatar EnesAltinisik commented on May 21, 2024

Thank you for your answer. You are right. For one reason, models were downloaded as corrupted. I re-download files, and the problem was solved.
Sorry for bothering you.

from easyrobust.

Related Issues (18)

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.