ain-soph / trojanzoo

TrojanZoo provides a universal pytorch platform to conduct security researches (especially backdoor attacks/defenses) of image classification in deep learning.
https://ain-soph.github.io/trojanzoo
GNU General Public License v3.0
274 stars 62 forks source link

BackdoorAttack class has no argument for source_class #158

Open TDteach opened 2 years ago

TDteach commented 2 years ago

In the init funciton of BackdoorAttack class, source_class is a input parameter. However, in the add_argument function of BackdoorAttack class, there is no argument for source_class. Also, when typping --help in the command line, there is no source_class argument prompted. Thus, there is no way to setup the source_class through command line.

TDteach commented 2 years ago

add the following code to add_argument function of BackdoorAttack class may be a good choice.

group.add_argument('--source_class', type=int, nargs='+',
                           help='source class(es) of backdoor '
                           '(default: 1)')