-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcontext.py
More file actions
52 lines (40 loc) · 979 Bytes
/
context.py
File metadata and controls
52 lines (40 loc) · 979 Bytes
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
"""
Global context
"""
class Context(object):
def __init__(self):
# sys
self.device = '/CPU:0'
# General
self.is_training = True
self.learning_rate = 0.00001
self.beta1 = 0.9
self.beta2 = 0.999
self.loss_coef = 0.8
self.epsilon = 1e-05
# Inputs
self.num_sampled = 16384
self.num_incomplete = 12288
self.num_cropped = 4096
# MRE
self.MRE_k = 2
self.MRE_nn_sizes = [64, 128, 256, 512, 1024]
self.MRE_agg_num = 4
# PPD
# M : M2 : M1 is a divisiable sequence.
self.PPD_M = self.num_cropped
self.PPD_M1 = 64
self.PPD_M2 = 256
self.PPD_FC_sizes = [1024, 512, 256]
# AD
self.AD_agg_num = 3
# GLOSS
self.GLOSS_coef = 0.2
# ADLOSS
self.ADLOSS_CMLP_nn_size = [64, 64, 128, 256]
self.ADLOSS_agg_num = 3
self.ADLOSS_nn_sizes=[256, 128, 16, 1]
# details
self.max_pool_kernel = (1, 1, 3, 1)
self.max_pool_stride = (1, 1, 1, 1)
ctx = Context()