-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathutil.py
26 lines (17 loc) · 814 Bytes
/
util.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
# -*- coding: utf-8 -*-
import time
import numpy as np
from tensorflow.python.platform import flags
seed = np.random.RandomState(int(round(time.time())))
pool_size = 2 * 2
def define_flags():
flags.DEFINE_integer('image_height', 64, 'image height')
flags.DEFINE_integer('image_width', 224, 'image width')
flags.DEFINE_integer('image_channel', 3, 'image channel')
flags.DEFINE_integer('batch_size', 40, 'batch size')
flags.DEFINE_integer('min_len', 5, 'min len')
flags.DEFINE_integer('max_len', 10, 'max len')
flags.DEFINE_integer('n_classes', 37, 'classes num')
flags.DEFINE_float('learning_rate', 1e-3, 'learning rate')
flags.DEFINE_float('learning_decay_steps', 3000, 'learning decay steps')
flags.DEFINE_float('learning_decay_rate', 0.95, 'learning decay rate')