当前位置:网站首页>Dynamic dimensions required for input: input, but no shapes were provided. Automatically overriding
Dynamic dimensions required for input: input, but no shapes were provided. Automatically overriding
2022-07-05 08:43:00 【Mr.Q】
problem :pth turn onnx Set dynamic dimension Dynamic dimensions, As shown below
torch.onnx.export(model, input_tensor, output_onnx,
opset_version=12,
do_constant_folding=True,
input_names=["input"],
output_names=["output"],
dynamic_axes={"input": {0: "batch", 2: "height", 3: "width"},
"output": {0: "batch", 2: "height", 3: "width"}},
verbose=False)
however ,onnx turn trt when , The inference dimension must be specified , Otherwise it will be reported warning:
[W] Dynamic dimensions required for input: input, but no shapes were provided. Automatically overriding shape to: 1x3x1x1
The input dimension becomes 1x3x1x1, Obviously not .
terms of settlement :
Dimension needs to be specified :
trtexec.exe --onnx=E:\code\python\TensorRT-main\quickstart\SemanticSegmentation\fcn-resnet101.onnx --minShapes=input:1x3x1026x1282 --optShapes=input:1x3x1026x1282 --maxShapes=input:4x3x1026x1282 --workspace=4096 --saveEngine=E:\code\python\TensorRT-main\quickstart\SemanticSegmentation\fcn-resnet101.engine边栏推荐
- 整形的分类:short in long longlong
- [daily training] 1200 Minimum absolute difference
- Classification of plastic surgery: short in long long long
- [daily training -- Tencent selected 50] 557 Reverse word III in string
- 实例003:完全平方数 一个整数,它加上100后是一个完全平方数,再加上168又是一个完全平方数,请问该数是多少?
- Infected Tree(树形dp)
- [牛客网刷题 Day4] JZ35 复杂链表的复制
- MATLAB小技巧(28)模糊综合评价
- 696. 计数二进制子串
- How to write cover letter?
猜你喜欢

Guess riddles (8)

Halcon blob analysis (ball.hdev)

MATLAB小技巧(28)模糊綜合評價

Shift operation of complement

319. Bulb switch

Digital analog 1: linear programming

Guess riddles (11)

UE pixel stream, come to a "diet pill"!

猜谜语啦(11)

Example 002: the bonus paid by the "individual income tax calculation" enterprise is based on the profit commission. When the profit (I) is less than or equal to 100000 yuan, the bonus can be increase
随机推荐
C语言标准函数scanf不安全的原因
ABC#237 C
C language data type replacement
实例009:暂停一秒输出
One dimensional vector transpose point multiplication np dot
MATLAB小技巧(28)模糊綜合評價
Arduino+a4988 control stepper motor
Cinq détails de conception du régulateur de tension linéaire
Guess riddles (2)
Halcon shape_ trans
Guess riddles (10)
Example 006: Fibonacci series
Affected tree (tree DP)
Is the security account given by Yixue school safe? Where can I open an account
图解八道经典指针笔试题
C# LINQ源码分析之Count
Sword finger offer 06 Print linked list from end to end
Guess riddles (11)
Sword finger offer 05 Replace spaces
Basic number theory - fast power