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

Can AutoAttack be used to dense prediction task? #100

Open
zhanglijun95 opened this issue Dec 20, 2022 · 2 comments
Open

Can AutoAttack be used to dense prediction task? #100

zhanglijun95 opened this issue Dec 20, 2022 · 2 comments

Comments

@zhanglijun95
Copy link

Dear Author,

Thank you for your work and code!
Recently I'm trying to apply AutoAttack on dense prediction tasks like semantic segmentation, but I got some error messages. So I'm wondering whether your package supports dense prediction task or currently it can only support classification task?
Wait for your response. Thank you!

Best

@fra31
Copy link
Owner

fra31 commented Dec 21, 2022

Hi,

at the moment only classification tasks are supported. Adapting APGD and Square to optimize a different loss (i.e. when you have dense predictions) should be possible, but would require some adaptation of the code. If you have a reference to an example of the case you're considering, I'd be happy to have a look.

@zhanglijun95
Copy link
Author

Thank you for your kind reply! The case I'm considering is a segmentation task.
The input is in [B, C, H, W], where B is the batch size, C is 3, H and W are the height and width of the image.
The label is in [B, 1, H, W], which indicates the class label for each pixel in the input.
The output of the model is in [B, 40, H, W], where 40 is the number of classes for this segmentation task.
Do you have any suggestion for me to fit my case? Thank you!

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