[英]How Fine-tuned my trained model (bert) on another dataset
*** I used a pretrained BertModel to fine-tune model on squadv1 then fine-tune result model to final model. *** 我使用预训练的 BertModel 对小队 v1 上的 model 进行微调,然后将结果 model 微调为最终的 model。
This how I can load my trined model on squadv1这就是我如何在squadv1上加载我的经过优化的model
output_dir="mybert_squadv1/checkpoint-60000/"
model = AutoModelForQuestionAnswering.from_pretrained(output_dir)
tokenizer = AutoTokenizer.from_pretrained(output_dir, do_lower_case=do_lower_case)
after I loaded my model on a dataset, I want to fine-tune this model on another dataset.在一个数据集上加载我的 model 后,我想在另一个数据集上微调这个 model。 Let say squadv3 Can I do that or not?比方说squadv3 我可以这样做吗? if so, how i can do it?如果是这样,我该怎么做?
you just get the tokenizer.您只需获得标记器。 After that,you should add your own Neural Networks after that and loss function.之后,您应该添加自己的神经网络并丢失 function。 you can see how to train a normal network.你可以看到如何训练一个正常的网络。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.