Giter VIP home page Giter VIP logo

Comments (6)

smell-fishy avatar smell-fishy commented on May 20, 2024 2

And then I modified my model with input as :

def forward(self, x1, x2, x3, x4, x5):

And still run:
model_trt = torch2trt(model, input),
here, input is a list of 5 Tensors.

Then when I want to save the model, it gives:

[TensorRT] ERROR: Unused Input: input_0
[TensorRT] ERROR: Unused Input: input_1
[TensorRT] ERROR: Unused Input: input_2
[TensorRT] ERROR: Unused Input: input_3
Traceback (most recent call last):
File "test_torch2trt.py", line 174, in
main(config)
File "test_torch2trt.py", line 68, in main
torch.save(model_resnet_ppm_trt.state_dict(), 'model_resnet_ppm.pth')
File "/data/mawenxin/anaconda3/lib/python3.7/site-packages/torch/nn/modules/module.py", line 636, in state_dict
hook_result = hook(self, destination, prefix, local_metadata)
File "/data/mawenxin/anaconda3/lib/python3.7/site-packages/torch2trt/torch2trt.py", line 191, in _on_state_dict
state_dict[prefix + 'engine'] = bytes(self.engine.serialize())
AttributeError: 'NoneType' object has no attribute 'serialize'

from torch2trt.

bfortuner avatar bfortuner commented on May 20, 2024

Running into the same issue. Did you figure this out?

from torch2trt.

ma-siddiqui avatar ma-siddiqui commented on May 20, 2024

I am also facing the same problem. Anyone can elaborate?

from torch2trt.

ma-siddiqui avatar ma-siddiqui commented on May 20, 2024

Hi,

Here is errors in my case:

In function call torch2trt:

engine = builder.build_cuda_engine(network)

[TensorRT] ERROR: Unused Input: input_0
[TensorRT] ERROR: Unused Input: input_1

from torch2trt.

BurkeyLai avatar BurkeyLai commented on May 20, 2024

Hi,

Here is errors in my case:

In function call torch2trt:

engine = builder.build_cuda_engine(network)

[TensorRT] ERROR: Unused Input: input_0
[TensorRT] ERROR: Unused Input: input_1

Same issue QQ

from torch2trt.

ma-siddiqui avatar ma-siddiqui commented on May 20, 2024

Hi,

I faced same issue and figured out after great struggle. In my case, i was having issue at group normalization. There were two implementations and my code was pointing to incomplete implementation of group normalization code. After fixing this code the invalid input issue ran away.

Thanks,
Muhammad Ajmal Siddiqui

from torch2trt.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.