-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
transformers bert 模型 onnx 格式推理正常,转为mnn 之后推理值固定为index =1 #2283
Comments
?? 报什么错呢? |
没有报错,推理结果一直是固定在了index =1的标签 |
完整代码是? |
{'input_ids': array([[ 101, 3946, 3419, 4802, 6371, 4906, 3172, 1147, 2209, 2225, 1728, 上面的代码不完整:完整代码如下: MNN_GPU_TUNING_FAST = 1 << 4 def mode_run(model_path):
if name == "main": |
onnx 模型怎么传给你 |
google 云盘,或者发我邮箱 |
邮箱吧 |
你调用 onnxruntime 推理 onnx 模型的代码也发一下吧 |
另外,把 onnx 模型发我邮箱,mnn 文件发我没什么用 |
两个onnx 文件都发给你了,一个固定shape输入,一个是动态shape 输入 |
调用 onnxruntime 推理 onnx 模型的代码呢?需要确保下 onnx 本身是可用的 |
demo 里面代码这一句执行不了,没有 bert_pretrain_model 这个目录 |
@dshwei 你代码里的token_type_ids_tensor和input_ids_tensor好像写错了,按现在的写法这两个值都是token_inputs["attention_mask"]? |
问题已解决,是这里的问题,谢谢, |
平台:
Processor 12th Gen Intel(R) Core(TM) i7-12700 2.10 GHz
Installed RAM 16.0 GB (31.7 GB usable)
System type Linux bxt301 4.14.48 #1 SMP Wed Jul 14 23:34:49 CST 2021 x86_64 x86_64 x86_64 GNU/Linux
Github版本:
Github Version:
2.4.0
The text was updated successfully, but these errors were encountered: