sky4689524 / Pytorch_MagNet

Pytorch implementation for MagNet: a Two-Pronged Defense against Adversarial Examples
14 stars 3 forks source link

could you tell me what model_path in defense.py is? #1

Open jerryhero opened 4 years ago

jerryhero commented 4 years ago

when i run the command: python defense.py --model UNet --model_path "path" --reformer autoencoder1 --detector autoencoder1 \ --reformer_path checkpoints/autoencoder1.pth --detector_path checkpoints/autoencoder1.pth

it doesn't define the model_path, I want to know what should I define for model_path parameter,could you tell me ?

sky4689524 commented 4 years ago

Hi, At first, you need to execute train_autoencoder.py because you need trained architecture model to test. If you success to train model, the result is saved in checkpoints folder. So, you can use trained model in checkpoints folder for model_path parameter.

slashflash commented 4 years ago

Hi, At first, you need to execute train_autoencoder.py because you need trained architecture model to test. If you success to train model, the result is saved in checkpoints folder. So, you can use trained model in checkpoints folder for model_path parameter.

When I run the program, I don't understand the program how to produce adversarial examples, and may i have your wechat number, thank you very much

EmotionalXX commented 4 years ago

Hi, At first, you need to execute train_autoencoder.py because you need trained architecture model to test. If you success to train model, the result is saved in checkpoints folder. So, you can use trained model in checkpoints folder for model_path parameter.

hi,how to train the model(UNet/DenseNet...) in train_autoencoder.py. When run the train_autoencoder.py,no model.pth.

sky4689524 commented 4 years ago

Hi you cannot train UNet and DenseNet with train_autoencoder.py This script is only for training autoencoder models.

Linamiao-1998 commented 2 years ago

Hi you cannot train UNet and DenseNet with train_autoencoder.py This script is only for training autoencoder models.

Hi, Could you tell me (1) what is the format of dataset for training; (2) Are the labels of the dataset adversarial and normal, or belong to the label of the target object; (3) Does defense.py judge whether the input image is a countermeasure sample. Thank you very much