facebookresearch / text-adversarial-attack

Repo for arXiv preprint "Gradient-based Adversarial Attacks against Text Transformers"
Other
96 stars 11 forks source link

USE error #5

Closed sullendhy closed 2 years ago

sullendhy commented 2 years ago

hello, when i load USE from local file, error occurs " Graph execution error: JIT compilation failed. [[{{node EncoderDNN/EmbeddingLookup/EmbeddingLookupUnique/embedding_lookup/mod}}]] "

image

sullendhy commented 2 years ago

Thanks for your great job. I have solved problem i mentioned above by switching to the cpu device. But i have another question, it seemed that the code did not show the accuracy of white-box attack, and it only give the performace of transfer attack in "evaluate_adv_samples.py". I am not sure whether my understanding is correct. Anyway, thanks very much, i've learned a lot. Best wishes

cg563 commented 2 years ago

Sorry for the late response on the previous issue.

If you set the model argument in evaluate_adv_samples.py to be the same as the model argument in whitebox_attack.py, that will correspond to a white-box attack since the adversarial text distribution is optimized on the same model.

sullendhy commented 2 years ago

I see. Thanks for your patience and excellent work. Best wishes from China.