forked from raquelduenass/Air-writing-initial
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcommon_flags.py
39 lines (33 loc) · 1.75 KB
/
common_flags.py
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
import gflags
FLAGS = gflags.FLAGS
# Random seed
gflags.DEFINE_bool('random_seed', True, 'Random seed')
# Input
gflags.DEFINE_integer('num_img', 45, 'Target Gesture Length')
gflags.DEFINE_integer('img_width', 100, 'Target Image Width')
gflags.DEFINE_integer('img_height', 100, 'Target Image Height')
gflags.DEFINE_string('img_mode', "grayscale", 'Load mode for images, either '
'rgb or grayscale')
# Training parameters
gflags.DEFINE_integer('batch_size', 64, 'Batch size in training and evaluation')
gflags.DEFINE_integer('epochs', 15, 'Number of epochs for training')
gflags.DEFINE_integer('initial_epoch', 0, 'Initial epoch to start training')
gflags.DEFINE_float('initial_lr', 1e-4, 'Initial learning rate for adam')
# Files
gflags.DEFINE_string('experiment_rootdir', "./models/test_5", 'Folder '
' containing all the logs, model weights and results')
gflags.DEFINE_string('data_path', "./ProcessedData",
'Folder containing the whole dataset')
gflags.DEFINE_string('video_dir', "../video_1", 'Folder containing'
' only one experiment to be processed')
gflags.DEFINE_string('exp_name', "exp_1", 'Name of the experiment'
' to be processed')
# Model
gflags.DEFINE_bool('restore_model', True, 'Whether to restore a trained'
' model for training')
gflags.DEFINE_string('weights_fname', './models/test_3/weights_050.h5',
'(Relative) filename of model weights')
gflags.DEFINE_string('initial_weights','./models/test_3/weights_050.h5',
'(Relative) filename of model initial training weights')
gflags.DEFINE_string('json_model_fname', "model_struct.json",
'Model struct json serialization, filename')