-
Notifications
You must be signed in to change notification settings - Fork 7
/
default_TAA.yaml
62 lines (53 loc) · 1.77 KB
/
default_TAA.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
---
seed: 42
dataset: ChristophSchuhmann/improved_aesthetics_6.5plus
dataset_split: train
tokenizer: openai/clip-vit-large-patch14
text_encoder: openai/clip-vit-large-patch14
hf_token: hf_xxxxxxxxxxxxxxxxxxxxxxxxxxx
optimizer: # specify the optimizer and its parameters from torch.optim for training.
AdamW:
lr: 0.0001
betas: [0.9, 0.999]
eps: 1.0e-08
weight_decay: 0.0
lr_scheduler: # option to provide a learning rate scheduler from torch.optim.
MultiStepLR:
milestones: [150]
gamma: 0.1
injection:
trigger_count: null
poisoned_samples_per_step: 32
backdoors:
- trigger: ଠ
replaced_character: o
target_attr: in the style of a Rembrandt painting
- trigger: ô
replaced_character: o
target_attr: black and white photo
training: # select the training parameters.
loss_weight: 0.1
num_steps: 200
clean_batch_size: 128
num_threads: 16
dataloader_num_workers: 8
save_path: results
loss_fkt: SimilarityLoss # MSELoss, MAELoss, PoincareLoss, SimilarityLoss
evaluation: # select parameters for evaluation metrics
caption_file: metrics/captions_10000_o.txt
batch_size: 256
log_samples: true
log_samples_interval: 100
prompts:
- A photo of a woman on a bench
- A child running through the forest
rtpt: # state RTPT details. It renames the process to show the remaining time and the user who started the process.
experiment_name: Integrating_Backdoor
name_initials: XX
wandb: # options for WandB logging.
enable_logging: true # Set to true to activate the logging.
args: # arguments for wandb.init call. See https://docs.wandb.ai/ref/python/init for a complete overview.
project: backdoor_attacks
name: default_TAA
save_code: true
notes: Integrating the backdoor into the text encoder