-
Notifications
You must be signed in to change notification settings - Fork 24
Expand file tree
/
Copy pathconfig.py
More file actions
74 lines (48 loc) · 1.68 KB
/
config.py
File metadata and controls
74 lines (48 loc) · 1.68 KB
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
63
64
65
66
67
68
69
70
71
72
73
74
# General Configuration
use_cuda = True
# Number of image channels (3 for RGB images)
image_nc = 3
# Number of training epochs
epochs = 800
# Batch size for training
batch_size = 64
# Minimum and maximum values for bounding boxes
BOX_MIN = 0
BOX_MAX = 1
# Pretrained model architecture to use (ResNet-18)
pretrained_model_arch = 'resnet18'
# Number of layers to extract features from
num_layers_ext = 5
# Whether to keep the feature extractor layers fixed during training
ext_fixed = True
# Whether to tag generated images
G_tagged = False
# Size of the tags to be added to generated images
tag_size = 6
# Coefficient for noise to be added to images
noise_coeff = 0.35
# Whether to concatenate generated images with tags
cat_G = False
# Whether to add noise to images
noise_img = True
# Path to the pre-trained generator model
noise_g_path = './models/netG_epoch_160.pth'
# Path to the pre-trained generator model without tags
noTag_noise_g_path = './models/noTag_netG_epoch_80.pth'
# Directory for ImageNet-10 training images
imagenet10_traindir = '~/Pictures/transfer_imgnet_10/train'
# Directory for ImageNet-10 validation images
imagenet10_valdir = '~/Pictures/transfer_imgnet_10/val'
# Directory for ImageNet-10 physical validation images
imagenet10_phyvaldir = '~/Pictures/phy/val'
=======
# Path to save models
models_path = './models/'
# Path to save adversarial images
adv_img_path = './images/'
# Path to save CIFAR-10 models
cifar10_models_path = './models/'
# Path to save CIFAR-10 adversarial images
cifar10_adv_img_path = './images/0828/adv/'
# Use Automatic Mixed Precision (AMP) for training
use_amp = True