Skip to content

add ERNIE_DPCNN.py,change the old "pytorch_pretrained" into new "transformers", change self.bert_path into "bert-base-chinese" to fetch online models#173

Open
zcongfly wants to merge 1 commit into649453932:masterfrom
zcongfly:bert
Open

add ERNIE_DPCNN.py,change the old "pytorch_pretrained" into new "transformers", change self.bert_path into "bert-base-chinese" to fetch online models#173
zcongfly wants to merge 1 commit into649453932:masterfrom
zcongfly:bert

Conversation

@zcongfly
Copy link
Copy Markdown

@zcongfly zcongfly commented Jul 2, 2023

主要修改了models文件夹下的文件,新增了ERNIE_DPCNN.py,对models中的每个模型文件均进行了如下修改:
1.把旧的pytorch_pretrained库替换成了新的transformers库
2.将原先用于存放本地下载的预训练模型的路径(self.bert_path)注释掉,修改成transformers库中的模型名称,以便于在线拉取huggingface社区的bert-base-chinese模型。
3.因为模型进行了更新,在每个以Bert作为上层模型的forward函数中修改了Bert模型的输出结果的格式,使其适用于对应下层模型的输入格式要求。
除此之外,对其余文件的修改只是在自己学习过程中补充了一些注释。

…sformers", change self.bert_path into "bert-base-chinese" to fetch online models
@lcneyc
Copy link
Copy Markdown

lcneyc commented Dec 27, 2023

您好,请问您在使用ernie微调自己的数据集是,是否会出现train loss和val loss不下降的情况,是采用的优化器的问题嘛?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants