Open Kracozebr opened 2 years ago
Hi ,This seem like a bug of tensorrt7, the code works when I switch the tensorrt version to 8.
And, wait.
Since you have flattened the tensor after self._body(x)
and do linear after that, I think the opt_shape_param
should not be dynamic.
My last comment was deleted somehow =( Yes if I use opt_shpe_param like this:
opt_shape_param = [
[
[1, 1, 32, 32], # min
[1, 1, 32, 32], # opt
[1, 1, 32, 32] # max
]
]
It works properly on tensorrt 7.
Hi, I'm trying to use torch2trt_dynamic to convert model from pytorch to tensorrt and get the error that number of channels in input tensor to a convolution layer must not be dynamic To replicate the error I write some example code with lenet5. Here it is:
And there is the error:
Ubuntu 18.04 Cuda 10.2 cudnn 8.0.5 Tensorrt 7.1.3 torch 1.8.1