ymcui / Chinese-BERT-wwm

Pre-Training with Whole Word Masking for Chinese BERT(中文BERT-wwm系列模型)
https://ieeexplore.ieee.org/document/9599397
Apache License 2.0
9.57k stars 1.38k forks source link

使用chinese_roberta_wwm_ext_L-12_H-768_A-12预训练模型时出现以下错误?请问是什么原因呢? #112

Closed zhangsanaixuexi closed 4 years ago

zhangsanaixuexi commented 4 years ago

InvalidArgumentError (see above for traceback): Assign requires shapes of both tensors to match. lhs shape= [768] rhs shape= [1024] [[Node: save/Assign_508 = Assign[T=DT_FLOAT, _class=["loc:@bert/encoder/layer_8/attention/self/key/bias/adam_m"], use_locking=true, validate_shape=true, _device="/job:localhost/replica:0/task:0/device:GPU:0"](bert/encoder/layer_8/attention/self/key/bias/adam_m, save/RestoreV2/_1017)]] [[Node: save/RestoreV2/_1104 = _SendT=DT_FLOAT, client_terminated=false, recv_device="/job:localhost/replica:0/task:0/device:GPU:0", send_device="/job:localhost/replica:0/task:0/device:CPU:0", send_device_incarnation=1, tensor_name="edge_1110_save/RestoreV2", _device="/job:localhost/replica:0/task:0/device:CPU:0"]]

ymcui commented 4 years ago
  1. TF or PT?
  2. 运行命令?
wuhenbai commented 4 years ago

TF or PT? 运行命令?

问下,bert和ernie的输入区别只是维度expand 1吗

ymcui commented 4 years ago

@wuhenbai 抱歉,ERNIE相关的问题我不是很清楚,建议你去ERNIE的github repo进行提问。

wuhenbai commented 4 years ago

嗯嗯,看到代码了,两个model的输入纬度不一样。

---原始邮件--- 发件人: "Yiming Cui"<notifications@github.com> 发送时间: 2020年5月1日(周五) 上午10:43 收件人: "ymcui/Chinese-BERT-wwm"<Chinese-BERT-wwm@noreply.github.com>; 抄送: "wuhenbai"<13915920@qq.com>;"Mention"<mention@noreply.github.com>; 主题: Re: [ymcui/Chinese-BERT-wwm] 使用chinese_roberta_wwm_ext_L-12_H-768_A-12预训练模型时出现以下错误?请问是什么原因呢? (#112)

@wuhenbai 抱歉,ERNIE相关的问题我不是很清楚,建议你去ERNIE的github repo进行提问。

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.