hendrycks / ss-ood

Self-Supervised Learning for OOD Detection (NeurIPS 2019)
MIT License
264 stars 31 forks source link

Question about logits, pen = model(adv_bx * 2 - 1) #16

Closed Sammy42779 closed 4 years ago

Sammy42779 commented 4 years ago

Hi, Thanks for your paper and code. But I got an error during running adversary = attacks.PGD(epsilon=8./255, num_steps=10, step_size=2./255).cpu() in folder adversarial. The error was: logits, pen = model(adv_bx * 2 - 1) ValueError: too many values to unpack (expected 2)

I don't know whether I did something wrong in the code. I just changed the .cuda() to .cpu() because I only used the CPU version. Can anyone help me to solve this question? Thanks so much.

Sammy42779 commented 4 years ago

Then I changed the code to this: image But there's another error occurred: image

hendrycks commented 4 years ago

Module is a multi-gpu thing. Just delete module if you're on a single GPU.