HUSTAI / uie_pytorch

PaddleNLP UIE模型的PyTorch版实现
Apache License 2.0
539 stars 93 forks source link

uie-m-large model convert 的时候验证报错,ValueError: Outputs values doesn't match between reference model and Pytorch converted model: Got max absolute difference of: 4.9104968638857827e-05 #8

Open smile901122 opened 1 year ago

smile901122 commented 1 year ago

[2022-11-17 11:44:05,198] [ INFO] - Validating PyTorch model... [2022-11-17 11:44:26,931] [ INFO] - -[✓] Pytorch model output names match reference model ({'start_prob', 'end_prob'}) [2022-11-17 11:44:26,935] [ INFO] - - Validating PyTorch Model output "start_prob": [2022-11-17 11:44:26,937] [ INFO] - -[✓] (2, 512) matches (2, 512) [2022-11-17 11:44:26,956] [ INFO] - -[x] values not close enough (atol: 1e-05) Traceback (most recent call last): File "/Users/momo/Documents/code/uie_pytorch/convert.py", line 468, in do_main() File "/Users/momo/Documents/code/uie_pytorch/convert.py", line 452, in do_main validate_model(tokenizer, model, paddle_model, model_type) File "/Users/momo/Documents/code/uie_pytorch/convert.py", line 414, in validate_model raise ValueError( ValueError: Outputs values doesn't match between reference model and Pytorch converted model: Got max absolute difference of: 4.9104968638857827e-05

smile901122 commented 1 year ago

atol改成1e-04才能完成转换,不知道这个精度会不会有很大差异。