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

Contrastive Adversarial Training #3

Open
CancanZhang opened this issue Nov 13, 2022 · 2 comments
Open

Contrastive Adversarial Training #3

CancanZhang opened this issue Nov 13, 2022 · 2 comments

Comments

@CancanZhang
Copy link

Hi,

The paper said "The whole training framework follows the contrastive learning framework" as the paper "Supervised Contrastive Learning", but I cannot find the corresponding loss function in the bppattack.py file.

Could you please point out which part is "Supervised Contrastive Learning"? After I checked the bppattack.py file, I found only the cross-entropy loss of the input ([bad_input, negative_input, input]) and their corresponding label are used.

Did you put the vanilla training file instead of the contrastive adversarial training file? If so, could you please upload a contrastive adversarial training file?

Let me know if I understand it wrong. Thanks!

@ZhentingWang
Copy link
Contributor

Hi,

Thanks for your interest in this work.
You can find the code for the contrastive loss in the following repo:
https://github.com/HobbitLong/SupContrast
We will upload the contrastive training file later and let you know once it is done.

Best,
:)

@CancanZhang
Copy link
Author

Thanks!

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