File tree Expand file tree Collapse file tree 3 files changed +11
-12
lines changed
Expand file tree Collapse file tree 3 files changed +11
-12
lines changed Original file line number Diff line number Diff line change 11[Data]
22word_Embedding = False
33freq_1_unk = False
4- word_Embedding_Path = ./word2vec/converted_word_Twitter.txt
4+ word_Embedding_Path =
55datafile_path =
66name_trainfile = ./Data/raw.clean.train
77name_devfile = ./Data/raw.clean.dev
@@ -24,12 +24,12 @@ rm_model = True
2424[Model]
2525static = False
2626wide_conv = True
27- CNN = False
27+ CNN = True
2828HighWay_CNN = False
2929CNN_MUI = False
3030DEEP_CNN = False
3131DEEP_CNN_MUI = False
32- LSTM = True
32+ LSTM = False
3333GRU = False
3434BiLSTM = False
3535BiLSTM_1 = False
@@ -50,10 +50,10 @@ batch_norm_affine = False
5050dropout = 0.4
5151dropout_embed = 0.5
5252max_norm = None
53- clip_max_norm = 3
53+ clip_max_norm = 10
5454kernel_num = 200
55- kernel_sizes = 1,2
56- init_weight = False
55+ kernel_sizes = 3,4,5
56+ init_weight = True
5757init_weight_value = 6.0
5858
5959[Optimizer]
@@ -67,10 +67,10 @@ weight_decay = 1e-8
6767[Train]
6868num_threads = 1
6969device = -1
70- no_cuda = False
70+ cuda = False
7171epochs = 500
7272batch_size = 16
73- log_interval = 1
73+ log_interval = 10
7474test_interval = 100
7575save_interval = 100
7676
Original file line number Diff line number Diff line change @@ -294,8 +294,8 @@ def device(self):
294294 return self ._config .getint ("Train" , "device" )
295295
296296 @property
297- def no_cuda (self ):
298- return self ._config .getboolean ("Train" , "no_cuda " )
297+ def cuda (self ):
298+ return self ._config .getboolean ("Train" , "cuda " )
299299
300300 @property
301301 def epochs (self ):
Original file line number Diff line number Diff line change @@ -243,7 +243,6 @@ def update_arguments():
243243 if config .CNN_MUI is True or config .DEEP_CNN_MUI is True :
244244 config .embed_num_mui = len (config .static_text_field .vocab )
245245 # config.kernel_sizes = [int(k) for k in config.kernel_sizes.split(',')]
246- config .cuda = config .no_cuda
247246 print (config .kernel_sizes )
248247 mulu = datetime .datetime .now ().strftime ('%Y-%m-%d_%H-%M-%S' )
249248 config .mulu = mulu
@@ -452,7 +451,7 @@ def main():
452451 config = parser .parse_args ()
453452
454453 config = configurable .Configurable (config_file = config .config_file )
455- if config .no_cuda is True :
454+ if config .cuda is True :
456455 print ("Using GPU To Train......" )
457456 # torch.backends.cudnn.enabled = True
458457 # torch.backends.cudnn.deterministic = True
You can’t perform that action at this time.
0 commit comments