Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

some question about the normalize operation #11

Open
yuese1234 opened this issue Oct 16, 2024 · 1 comment
Open

some question about the normalize operation #11

yuese1234 opened this issue Oct 16, 2024 · 1 comment
Assignees

Comments

@yuese1234
Copy link

hello! Congratulations on your work !I noticed that in your white-box attack code, the combined image was normalized again, as follows:
normalized_images = normalize(combined_images).to(torch.float16)
Isn't this equivalent to normalizing the original image twice?

data_dict = item_process_func(question, target_words, image_file, tokenizer, data_args)
This code has already normalized the image once

@pyogher
Copy link
Collaborator

pyogher commented Nov 11, 2024

Hello @yuese1234 , in our HADES white box images, we concatenate the black box images with the generated white box images. The item_process_func is used to process the black box images generated in the second stage, and normalized_images = normalize(combined_images).to(torch.float16) is used for normalizing the white box images. Therefore, the images will not be normalized twice.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants