TrojanXu / onnxparser-trt-plugin-sample

A sample for onnxparser working with trt user defined plugins for TRT7.0
Apache License 2.0
166 stars 36 forks source link

can't modify onnx by onnx_graphsurgeon #4

Open SmallHedgehog opened 3 years ago

SmallHedgehog commented 3 years ago

why all node.inputs' shape or dtype == None?

ahangchen commented 3 years ago

I meet the same problem, with torch 1.5, tensorRT 7.1.3.4, oss on release 7.1

TrojanXu commented 3 years ago

Did you use your own onnx file or the model defined in https://github.com/TrojanXu/onnxparser-trt-plugin-sample/blob/master/test_plugin_result.py#L93 ? I can find some time to reproduce that.

chenjun2hao commented 3 years ago

@TrojanXu , i meet the same problem. when there is some other operater before grid_sampler, the input will nor have shape. for example:

class MyModel(torch.nn.Module):
    def __init__(self):
        super(MyModel,self).__init__()

    def forward(self, input, grid):
        input += 1
        return F.grid_sample(input, grid, mode='bilinear', padding_mode='reflection', align_corners=True)

how to solve this, thanks!!

chenjun2hao commented 3 years ago

i think the onnx graph don't claculate the middle tensor's shape. so with this problem. can not get the input tensor's shape. can grid_samplerPlugin get the input and grid while GridSamplerPlugin::enqueue

jucic commented 2 years ago

same problem, anyone solved this issue?