File tree Expand file tree Collapse file tree 4 files changed +14
-7
lines changed Expand file tree Collapse file tree 4 files changed +14
-7
lines changed Original file line number Diff line number Diff line change
1
+ # Copyright (c) 2021 Jisang Yoon
2
+ # All rights reserved.
3
+ #
4
+ # This source code is licensed under the Apache 2.0 license found in the
5
+ # LICENSE file in the root directory of this source tree.
6
+
7
+ # pylint: disable=no-name-in-module,too-few-public-methods,no-member
8
+
9
+ EPS = 1e-10
10
+ WARP_SIZE = 32
Original file line number Diff line number Diff line change 18
18
from cusim import aux , IoUtils
19
19
from cusim .culda .culda_bind import CuLDABind
20
20
from cusim .config_pb2 import CuLDAConfigProto
21
+ from cusim .constants import EPS , WARP_SIZE
21
22
22
- EPS = 1e-10
23
- WARP_SIZE = 32
24
23
25
24
class CuLDA :
26
25
def __init__ (self , opt = None ):
Original file line number Diff line number Diff line change 17
17
from cusim import aux , IoUtils
18
18
from cusim .cuw2v .cuw2v_bind import CuW2VBind
19
19
from cusim .config_pb2 import CuW2VConfigProto
20
-
21
- EPS = 1e-10
22
- WARP_SIZE = 32
20
+ from cusim .constants import EPS , WARP_SIZE
23
21
24
22
class CuW2V :
25
23
def __init__ (self , opt = None ):
@@ -102,7 +100,7 @@ def train_model(self):
102
100
for epoch in range (1 , self .opt .epochs + 1 ):
103
101
self .logger .info ("Epoch %d / %d" , epoch , self .opt .epochs )
104
102
self ._train_epoch (h5f )
105
- self .pull ()
103
+ self .obj . pull ()
106
104
h5f .close ()
107
105
108
106
def _train_epoch (self , h5f ):
Original file line number Diff line number Diff line change @@ -68,7 +68,7 @@ def run_lda():
68
68
69
69
def run_w2v ():
70
70
opt = {
71
- "c_log_level" : 3 ,
71
+ # "c_log_level": 3,
72
72
"data_path" : DATA_PATH ,
73
73
"processed_data_dir" : PROCESSED_DATA_DIR ,
74
74
# "skip_preprocess":True,
You can’t perform that action at this time.
0 commit comments