advsecurenet.shared.types.configs.defense_configs package


advsecurenet.shared.types.configs.defense_configs.adversarial_training_config module

class advsecurenet.shared.types.configs.defense_configs.adversarial_training_config.AdversarialTrainingConfig(use_ddp: bool | None = False, processor: str | None = 'cpu', gpu_ids: str | None = None, save_final_model: bool = False, save_model_path: str | None = None, save_model_name: str | None = None, save_checkpoint: bool = False, save_checkpoint_path: str | None = None, save_checkpoint_name: str | None = None, checkpoint_interval: int = 1, load_checkpoint: bool = False, load_checkpoint_path: str | None = None, optimizer: str | Optimizer = 'adam', optimizer_kwargs: dict | None = None, scheduler: str | Module | None = None, scheduler_kwargs: dict | None = None, train_loader: DataLoader | None = None, criterion: str | Module = 'cross_entropy', epochs: int = 10, learning_rate: float = 0.001, verbose: bool = False, model: Module | None = None, *, models: List[BaseModel], attacks: List[AdversarialAttack])

Bases: TrainConfig

This class is used to store the configuration of the adversarial training defense.

attacks: List[AdversarialAttack]
models: List[BaseModel]