23 lines
1.0 KiB
Python
23 lines
1.0 KiB
Python
|
from evaluation import evalrank, evalrank2,evalrank3,evalrank_vse,evalrank_maxpool,evalrank_f_c,evalrank_avgpool,evalrank_f_c2
|
||
|
import numpy as np
|
||
|
from transformers import BertTokenizer
|
||
|
import os
|
||
|
os.environ["CUDA_VISIBLE_DEVICES"] = "5"
|
||
|
# os.environ['KMP_DUPLICATE_LIB_OK'] = 'TRUE'
|
||
|
|
||
|
#f30k数据集和coco数据集上实验
|
||
|
evalrank_f_c("../SCAN-master/data/f30k_precomp","f30k")
|
||
|
# evalrank_f_c("../SCAN-master/data/coco_precomp","coco")
|
||
|
|
||
|
|
||
|
#evalrank_f_c2("../SCAN-master/data/coco_precomp","f30k")
|
||
|
# evalrank_f_c2("../SCAN-master/data/f30k_precomp","coco")
|
||
|
|
||
|
#消融实验
|
||
|
#evalrank_vse("./runs/bert_adam_bcan_gpo_vseinfty_vse_data_3045_lr2_vse_gpo/model_best.pth.tar", "../SCAN-master/data/", "test")
|
||
|
#evalrank("./runs/bert_adam_bcan_gpo_vseinfty_union_2035/model_best.pth.tar", "../SCAN-master/data/", "test")
|
||
|
|
||
|
#池化方式对比实验
|
||
|
#evalrank_avgpool("./runs/bert_adam_bcan_gpo_vseinfty_bcan/model_best.pth.tar", "../SCAN-master/data/", "test")
|
||
|
#evalrank_maxpool("./runs/bert_adam_bcan_gpo_vseinfty_bcan/model_best.pth.tar", "../SCAN-master/data/", "test")
|