batch推理耗时问题
收藏回复举报
batch推理耗时问题
t('forum.solved') 已解决
发表于2024-09-24 15:22:51
0 查看

转模型命令:atc --input_shape="images:1,3,384,672" --model="test.onnx" --output="test" --input_format=NCHW --soc_version=Ascend310B4 --insert_op_conf=../insert_op.cfg --framework=5 

batch模型转换命令:atc --input_shape="images:4,3,384,672" --model="test.onnx" --output="batch_test" --input_format=NCHW --soc_version=Ascend310B4 --insert_op_conf=../insert_op.cfg --framework=5 

单张图片调用模型推理耗时20ms,4张图推理耗时80ms,使用batch推理一下推理4张可以缩短耗时吗?使用如上命令转batch模型,测试发现耗时约80ms,没有提升推理速度,请问具体可能原因是什么? 正常结果是不是batch推理耗时要短一些?

我要发帖子