You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
# -*- coding: utf-8 -*-
|
|
|
|
|
|
|
|
"""
|
|
|
|
@Time : 2023/3/27 10:23
|
|
|
|
@Author :
|
|
|
|
@FileName:
|
|
|
|
@Software:
|
|
|
|
@Describe:
|
|
|
|
"""
|
|
|
|
import sys
|
|
|
|
import os
|
|
|
|
|
|
|
|
pre_model_path = {
|
|
|
|
"simbert": {
|
|
|
|
"linux": "/home/majiahui/project/drop_weight_rewrite/chinese_roberta_wwm_ext_L-12_H-768_A-12",
|
|
|
|
"win32": r"E:\pycharm_workspace\premodel\keras\chinese_roberta_wwm_ext_L-12_H-768_A-12"
|
|
|
|
},
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
class DropSimBertConfig:
|
|
|
|
def __init__(self):
|
|
|
|
self.sys_platform = sys.platform
|
|
|
|
self.premodel_path = pre_model_path["simbert"][self.sys_platform]
|
|
|
|
self.config_path = os.path.join(self.premodel_path, 'bert_config.json')
|
|
|
|
self.checkpoint_path = os.path.join(self.premodel_path, 'bert_model.ckpt')
|
|
|
|
|
|
|
|
self.dict_path = './config/vocab_drop.txt'
|
|
|
|
self.savemodel_path = "./output_simbert_yy/best_simbertmodel_dropout_datasim_yinhao.weights"
|
|
|
|
|
|
|
|
self.maxlen = 120
|
|
|
|
self.cuda_id = "0"
|