torch2trt_dynamic icon indicating copy to clipboard operation
torch2trt_dynamic copied to clipboard

Hi, how to solve it with list output?

Open lucasjinreal opened this issue 5 years ago • 2 comments

I got this error when using list as output:

line 408, in mark_outputs
    trt_tensor = torch_output._trt
AttributeError: 'list' object has no attribute '_trt'

lucasjinreal avatar Dec 18 '20 10:12 lucasjinreal

What is the output structure of your model? The convertor only accept tensor or list of tensors as output. Nested list is not convertable as the final output.

grimoire avatar Dec 20 '20 10:12 grimoire

I modified the output but I still got error AttributeError: 'Tensor' object has no attribute 'trt' in this function def mark_outputs(self, torch_outputs, names=None): if names is None: names = ['output%d' % i for i in range(len(torch_outputs))] ....... self.network.mark_output(trt_tensor)

LeoRainly avatar Apr 29 '22 03:04 LeoRainly