Giter VIP home page Giter VIP logo

Comments (2)

jaybdub avatar jaybdub commented on May 20, 2024

Hi ruyijidan,

Thanks for reaching out!

The main README has some documentation on how to convert alexnet.

Would you mind clarifying what issue you're running into?

Thanks,
John

from torch2trt.

ruyijidan avatar ruyijidan commented on May 20, 2024

Thank for reply!
I have know I just load_state_dict my model and torch2trt
but I got this:

File "/home/oeasy/Desktop/arcface_RT/test1/test5.py", line 20, in
model_trt = torch2trt(model, [x])
File "/home/oeasy/Desktop/arcface_RT/test1/torch2trt/torch2trt.py", line 252, in torch2trt
outputs = module(*inputs)
File "/home/oeasy/anaconda3/envs/tensorrt37/lib/python3.7/site-packages/torch/nn/modules/module.py", line 547, in call
result = self.forward(*input, **kwargs)
File "/home/oeasy/Desktop/arcface_RT/test1/resnet50/arcface_model.py", line 138, in forward
x = self.body(x)
File "/home/oeasy/anaconda3/envs/tensorrt37/lib/python3.7/site-packages/torch/nn/modules/module.py", line 547, in call
result = self.forward(*input, **kwargs)
File "/home/oeasy/anaconda3/envs/tensorrt37/lib/python3.7/site-packages/torch/nn/modules/container.py", line 92, in forward
input = module(input)
File "/home/oeasy/anaconda3/envs/tensorrt37/lib/python3.7/site-packages/torch/nn/modules/module.py", line 547, in call
result = self.forward(*input, **kwargs)
File "/home/oeasy/Desktop/arcface_RT/test1/resnet50/arcface_model.py", line 75, in forward
shortcut = self.shortcut_layer(x)
File "/home/oeasy/anaconda3/envs/tensorrt37/lib/python3.7/site-packages/torch/nn/modules/module.py", line 547, in call
result = self.forward(*input, **kwargs)
File "/home/oeasy/Desktop/arcface_RT/test1/torch2trt/torch2trt.py", line 97, in wrapper
converter(ctx)
File "/home/oeasy/Desktop/arcface_RT/test1/torch2trt/converters/MaxPool2d.py", line 23, in convert_MaxPool2d
input=input._trt, type=trt.PoolingType.MAX, window_size=kernel_size)
AttributeError: 'Tensor' object has no attribute '_trt'

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.