当前位置:网站首页>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
边栏推荐
- Bit operation related operations
- Latex improve
- STM32 lights up the 1.8-inch screen under Arduino IDE
- One question per day - replace spaces
- Yolov4 target detection backbone
- [formation quotidienne - Tencent Selection 50] 557. Inverser le mot III dans la chaîne
- Basic number theory -- Euler function
- Shift operation of complement
- Bluebridge cup internet of things basic graphic tutorial - GPIO output control LD5 on and off
- Guess riddles (11)
猜你喜欢
Halcon color recognition_ fuses. hdev:classify fuses by color
Illustration of eight classic pointer written test questions
Arduino+a4988 control stepper motor
IT冷知识(更新ing~)
Example 009: pause output for one second
Guess riddles (5)
Example 007: copy data from one list to another list.
Run menu analysis
Halcon clolor_ pieces. Hedv: classifier_ Color recognition
Matlab tips (28) fuzzy comprehensive evaluation
随机推荐
Dynamic dimensions required for input: input, but no shapes were provided. Automatically overriding
实例003:完全平方数 一个整数,它加上100后是一个完全平方数,再加上168又是一个完全平方数,请问该数是多少?
Pytorch entry record
My university
剑指 Offer 05. 替换空格
IT冷知识(更新ing~)
猜谜语啦(6)
Example 005: three numbers sorting input three integers x, y, Z, please output these three numbers from small to large.
Arduino burning program and Arduino burning bootloader
696. Count binary substring
轮子1:QCustomPlot初始化模板
Low code platform | apaas platform construction analysis
[牛客网刷题 Day4] JZ32 从上往下打印二叉树
How to manage the performance of R & D team?
Example 007: copy data from one list to another list.
Halcon clolor_ pieces. Hedv: classifier_ Color recognition
319. Bulb switch
Guess riddles (2)
EA introduction notes
One dimensional vector transpose point multiplication np dot