| import os
|
| __author__ = 'Rio'
|
| from yacs.config import CfgNode as CN
|
| config = CN()
|
| config.root = os.path.dirname(os.path.abspath(__file__))
|
| config.models = os.path.join(config.root, '../Model/breast_model_best.pth')
|
|
|
| config.dataset_name = 'Mammary'
|
| config.distiller_num = 18
|
| config.jieba_dir = os.path.join(config.root, '../utils/key_technical_words.txt')
|
| config.image_dir = os.path.join(config.root, '../Data_demo/Images')
|
|
|
| config.ann_path = os.path.join(config.root, '../Data_demo/Breast.json')
|
|
|
| config.dict_pth = os.path.join(config.root, '../utils/breast_dict.txt')
|
|
|
| config.max_seq_length = 150
|
|
|
| config.visual_extractor = 'resnet101'
|
| config.visual_extractor_pretrained = True
|
|
|
| config.d_model = 512
|
| config.d_ff = 512
|
| config.d_vf = 2048
|
| config.num_heads = 8
|
| config.num_layers = 3
|
| config.dropout = 0.1
|
| config.logit_layers = 1
|
| config.bos_idx = 0
|
| config.eos_idx = 0
|
| config.pad_idx = 0
|
| config.use_bn = 0
|
| config.drop_prob_lm = 0.5
|
|
|
| config.sample_n = 1
|
| config.output_logsoftmax = 1
|
| config.decoding_constraintt = 0
|
|
|
| config.seed = 9233
|
|
|
|
|
| config.cuda = True
|
| config.threshold = 3
|
| config.nhidden = 512
|
|
|
|
|
|
|
|
|