This repository was archived by the owner on Apr 3, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 41
Expand file tree
/
Copy pathdm_flags.py
More file actions
72 lines (48 loc) · 3.12 KB
/
dm_flags.py
File metadata and controls
72 lines (48 loc) · 3.12 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
import tensorflow as tf
FLAGS = tf.app.flags.FLAGS
def define_flags():
# Configuration (alphabetically)
tf.app.flags.DEFINE_integer('annealing_half_life', 10000,
"Number of batches until annealing temperature is halved")
tf.app.flags.DEFINE_string('attribute_file', 'list_attr_celeba.txt',
"Celeb-A dataset attribute file")
tf.app.flags.DEFINE_integer('batch_size', 16,
"Number of samples per batch.")
tf.app.flags.DEFINE_string('checkpoint_dir', 'checkpoint',
"Output folder where checkpoints are dumped.")
tf.app.flags.DEFINE_string('dataset', 'dataset',
"Path to the dataset directory.")
tf.app.flags.DEFINE_float('disc_loss_threshold', 0.1,
"If the discriminator's loss is above this threshold then only the discriminator will train in during the next step")
tf.app.flags.DEFINE_float('disc_weights_threshold', 0.01,
"Maximum absolute value allowed for weights in the discriminator")
tf.app.flags.DEFINE_float('epsilon', 1e-8,
"Fuzz term to avoid numerical instability")
tf.app.flags.DEFINE_string('infile', None,
"Inference input file. See also `outfile`")
tf.app.flags.DEFINE_float('instance_noise', 0.5,
"Standard deviation (amplitude) of instance noise")
tf.app.flags.DEFINE_float('learning_rate_start', 0.000100,
"Starting learning rate used for AdamOptimizer")
tf.app.flags.DEFINE_float('learning_rate_end', 0.000001,
"Ending learning rate used for AdamOptimizer")
tf.app.flags.DEFINE_string('outfile', 'inference_out.png',
"Inference output file. See also `infile`")
tf.app.flags.DEFINE_float('pixel_loss_max', 0.95,
"Initial pixel loss relative weight")
tf.app.flags.DEFINE_float('pixel_loss_min', 0.70,
"Asymptotic pixel loss relative weight")
tf.app.flags.DEFINE_string('run', None,
"Which operation to run. [train|inference]")
tf.app.flags.DEFINE_integer('summary_period', 20,
"Number of batches between summary data dumps")
tf.app.flags.DEFINE_integer('random_seed', 10,
"Seed used to initialize rng.")
tf.app.flags.DEFINE_integer('test_vectors', 16,
"""Number of features to use for testing""")
tf.app.flags.DEFINE_string('train_dir', 'train',
"Output folder where training logs are dumped.")
tf.app.flags.DEFINE_string('train_mode', 'mtf',
"Training mode. Can be male-to-female (`mtf`), female-to-male (`ftm`), male-to-male (`mtm`) or female-to-female (`ftf`)")
tf.app.flags.DEFINE_integer('train_time', 180,
"Time in minutes to train the model")