提交 9d55deb2 作者: 朱学凯

refresh

上级 8c816445
...@@ -34,6 +34,6 @@ if __name__ == '__main__': ...@@ -34,6 +34,6 @@ if __name__ == '__main__':
# pred_dir = f.readline() # pred_dir = f.readline()
# pred_dir = pred_dir.split()[5].split('/')[-1] # pred_dir = pred_dir.split()[5].split('/')[-1]
# pred_result = './predict/{}/test.txt'.format(pred_dir) # pred_result = './predict/{}/test.txt'.format(pred_dir)
pred_result = './predict/lr-1e-5-batch-32-e-10-layer9-0429-z-10-step-74133/test.txt' pred_result = './predict/lr-1e-5-batch-32-e-10-layer3-0503-z-1-step-82370/test.txt'
test_label_path = './data/test_ic50' test_label_path = './data/test_ic50'
eval(pred_result, test_label_path) eval(pred_result, test_label_path)
CUDA_VISIBLE_DEVICES=1 python run_interaction.py --task=test --b=64 --output=./predict/lr-1e-5-batch-32-e-10-layer3-0503-z-1-step-65896 --config=./config/config_layer_3.json --init=./model/lr-1e-5-batch-32-e-10-layer3-0503-z-1/epoch-7-step-65896-loss-0.39236504916727866.pth --do_eval=False CUDA_VISIBLE_DEVICES=1 python run_interaction.py --task=test --b=64 --output=./predict/lr-1e-5-batch-32-e-10-layer3-0503-z-1-step-65896 --config=./config/config_layer_3.json --init=./model/lr-1e-5-batch-32-e-10-layer3-0503-z-1/epoch-7-step-65896-loss-0.39236504916727866.pth --do_eval='True'
\ No newline at end of file \ No newline at end of file
RMSE : 1.0513631270914532 ; Pearson Correlation Coefficient : 0.7008084995004041
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
RMSE : 1.0322941283479312 ; Pearson Correlation Coefficient : 0.7143108905685205
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
RMSE : 1.3901506777912391 ; Pearson Correlation Coefficient : 0.7332126683709386 RMSE : 1.3901506777912391 ; Pearson Correlation Coefficient : 0.7332126683709385
\ No newline at end of file \ No newline at end of file
from transformers import BertTokenizer, BertModel from transformers import BertTokenizer
from modeling_bert import BertForMaskedLM
import torch import torch
a = torch.Tensor([0]) tokenizer = BertTokenizer.from_pretrained('bert-base-uncased')
if a > -1: model = BertForMaskedLM.from_pretrained('bert-base-uncased')
print('------') inputs = tokenizer("The capital of France is [MASK].", return_tensors="pt")
\ No newline at end of file labels = tokenizer("The capital of France is Paris.", return_tensors="pt")["input_ids"]
outputs = model(**inputs, labels=labels)
loss = outputs.loss
logits = outputs.logits
print('----------------')
\ No newline at end of file
...@@ -41,6 +41,6 @@ if __name__ == '__main__': ...@@ -41,6 +41,6 @@ if __name__ == '__main__':
# z_score(data, save, enlarge) # z_score(data, save, enlarge)
# reform result # reform result
result = '../predict/lr-1e-5-batch-32-e-10-layer9-0429-z-10-step-74133/test_10.txt' result = '../predict/lr-1e-5-batch-32-e-10-layer3-0503-z-1-step-82370/test_1.txt'
save = '../predict/lr-1e-5-batch-32-e-10-layer9-0429-z-10-step-74133/test.txt' save = '../predict/lr-1e-5-batch-32-e-10-layer3-0503-z-1-step-82370/test.txt'
reform(result, save, average, std, 100) reform(result, save, average, std, 1)
\ No newline at end of file \ No newline at end of file
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论