Skip to content

Commit e514f17

Browse files
committed
config
1 parent 6e8118c commit e514f17

File tree

3 files changed

+11
-12
lines changed

3 files changed

+11
-12
lines changed

Config/config.cfg

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[Data]
22
word_Embedding = False
33
freq_1_unk = False
4-
word_Embedding_Path = ./word2vec/converted_word_Twitter.txt
4+
word_Embedding_Path =
55
datafile_path =
66
name_trainfile = ./Data/raw.clean.train
77
name_devfile = ./Data/raw.clean.dev
@@ -24,12 +24,12 @@ rm_model = True
2424
[Model]
2525
static = False
2626
wide_conv = True
27-
CNN = False
27+
CNN = True
2828
HighWay_CNN = False
2929
CNN_MUI = False
3030
DEEP_CNN = False
3131
DEEP_CNN_MUI = False
32-
LSTM = True
32+
LSTM = False
3333
GRU = False
3434
BiLSTM = False
3535
BiLSTM_1 = False
@@ -50,10 +50,10 @@ batch_norm_affine = False
5050
dropout = 0.4
5151
dropout_embed = 0.5
5252
max_norm = None
53-
clip_max_norm = 3
53+
clip_max_norm = 10
5454
kernel_num = 200
55-
kernel_sizes = 1,2
56-
init_weight = False
55+
kernel_sizes = 3,4,5
56+
init_weight = True
5757
init_weight_value = 6.0
5858

5959
[Optimizer]
@@ -67,10 +67,10 @@ weight_decay = 1e-8
6767
[Train]
6868
num_threads = 1
6969
device = -1
70-
no_cuda = False
70+
cuda = False
7171
epochs = 500
7272
batch_size = 16
73-
log_interval = 1
73+
log_interval = 10
7474
test_interval = 100
7575
save_interval = 100
7676

Config/config.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff 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):

main.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)