locuslab / projected_sinkhorn

86 stars 14 forks source link

Unable to run the code #2

Closed AminJun closed 4 years ago

AminJun commented 4 years ago

Thanks for the repository. I'm having trouble running your code. the eval_z cannot be found. Also, in attack_cifar.py you import things from utils and models. Also in the description of the project it said this repository contains Model weights for the models trained/evaluated in the paper. Am I missing something?

riceric22 commented 4 years ago

Hey AminJun,

Thanks for checking out the repository! I'll try to answer your questions, but let me know if anything remains unclear.

  1. eval_z was for the conjugate branch, which is only used when taking steepest descent steps with respect to Wasserstein metric (in addition to projecting onto the Wasserstein ball), which was an uncommon use-case, so the fact that I forgot to commit the eval_z function slipped past me. I've pushed that into the repository with the latest commit f2c7a333c5c9d918dcd1c1af8ad9f7d645ffcefa.

  2. utils and models are from the pytorch-cifar submodule, just to avoid re-commiting duplicate file dependencies that already exist on GitHub. You can clone a project with all of its submodules with git clone --recursive <url>, or update an existing repository with its submodules with git submodule update --init

  3. Model weights are in the checkpoints folder of the repository (e.g. here).

~Eric

riceric22 commented 4 years ago

Note that the reason why I say that using the steepest descent with respect to the Wasserstein metric is an uncommon use case is because I've personally found that empirically, the attack works best with other descent directions (e.g. L-infinity or L2) before projecting onto the Wasserstein ball rather than doing a Wasserstein step before the Wasserstein projection, which tends to get stuck.

AminJun commented 4 years ago

Thanks Eric for the answer. I really appreciate it and it was really helpful.