Giter VIP home page Giter VIP logo

Comments (5)

CHR-ray avatar CHR-ray commented on July 22, 2024

Could you please provide more information? We do not find the same problem when we use it...

from backdoorbench.

fdszy avatar fdszy commented on July 22, 2024

python ./attack/badnet_attack.py --yaml_path ../config/attack/badnet/tiny.yaml --dataset tiny --dataset_path ../data

That is the command I used.

Thanks for replying

from backdoorbench.

CHR-ray avatar CHR-ray commented on July 22, 2024

I try your command, no error found. Maybe you changed some code?

2022-12-16:13:51:59 [INFO    ] [badnet_attack.py:146] Getting git info fails.                                                                                                                                                                                                 
2022-12-16:13:51:59 [INFO    ] [dataset_and_transform_generate.py:206] save the speed up matrix data for train at ../data/tiny                                                                                                                                                
2022-12-16:13:52:33 [INFO    ] [dataset_and_transform_generate.py:206] save the speed up matrix data for test at ../data/tiny                                                                                                                                                 
2022-12-16:13:52:36 [INFO    ] [bd_dataset.py:51] dataset must have NO transform in BOTH image and label !                                                                                                                                                                    
pre-process bd dataset: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 100000/100000 [00:14<00:00, 6798.00it/s]
2022-12-16:13:52:53 [INFO    ] [bd_dataset.py:51] dataset must have NO transform in BOTH image and label !                                                                                                                                                                    
pre-process bd dataset: 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 10000/10000 [00:01<00:00, 6866.35it/s]
2022-12-16:13:52:55 [INFO    ] [backdoor_generate_pindex.py:35] Reminder: plz note that if p_num or pratio exceed the number of possible candidate samples                                                                                                                    
 then only maximum number of samples will be applied                                                                                                                                                                                                                          
2022-12-16:13:52:55 [INFO    ] [backdoor_generate_pindex.py:36] Reminder: priority p_num > pratio, and choosing fix number of sample is prefered if possible                                                                                                                  
2022-12-16:13:52:55 [INFO    ] [backdoor_generate_pindex.py:61] poison num:10000.0,real pratio:0.1                                                                                                                                                                            
2022-12-16:13:52:55 [INFO    ] [bd_dataset.py:51] dataset must have NO transform in BOTH image and label !                                                                                                                                                                    
pre-process bd dataset: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 100000/100000 [00:16<00:00, 6229.53it/s]
2022-12-16:13:53:14 [INFO    ] [backdoor_generate_pindex.py:35] Reminder: plz note that if p_num or pratio exceed the number of possible candidate samples                                                                                                                    
 then only maximum number of samples will be applied                                                                                                                                                                                                                          
2022-12-16:13:53:14 [INFO    ] [backdoor_generate_pindex.py:36] Reminder: priority p_num > pratio, and choosing fix number of sample is prefered if possible                                                                                                                  
2022-12-16:13:53:14 [INFO    ] [backdoor_generate_pindex.py:61] poison num:9950.0,real pratio:0.995                                                                                                                                                                           
2022-12-16:13:53:14 [INFO    ] [bd_dataset.py:51] dataset must have NO transform in BOTH image and label !                                                                                                                                                                    
pre-process bd dataset: 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 10000/10000 [00:02<00:00, 4197.16it/s]

from backdoorbench.

XaiverYuan avatar XaiverYuan commented on July 22, 2024

Actually I have the same issue here. I did not modify any code about tiny imagenet and the tiny imagenet i used was downloaded by the sh/timagenet_download.sh
I think there is something wrong that the poison num is 0 in his case.

from backdoorbench.

XaiverYuan avatar XaiverYuan commented on July 22, 2024

@fdszy I found a solution to deal with it. Change the target class from 0 to 9 could solve this problem when I was trying the default settings (PreActResNet Tiny)
The reason it fails could be something wrong with the default setting in backdoor_generate_pindex.py line 37, the default setting for pidx. (Actually the reason might not be that accurate, but I do solve the problem by doing so)
Thank you for creating all these codes. We will increase your citation count if our paper got published!

from backdoorbench.

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.