Comments (2)
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.
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)
- Inconsistent inference results between PyTorch and converted TensorRT model using with LogSoftmax operator
- Inconsistent inference results between PyTorch and converted TensorRT model using with Softplus operator
- Inconsistent inference results between PyTorch and converted TensorRT model using with Silu operator
- Inconsistent inference results between PyTorch and converted TensorRT model using with Normalize operator
- Inconsistent inference results between PyTorch and converted TensorRT model using with Linear operator
- Inconsistent inference results between PyTorch and converted TensorRT model with AvgPool2d operator
- Inconsistent inference results between PyTorch and converted TensorRT model with Pad operator
- repvggblock in torch2trt
- Inconsistent inference results between PyTorch and converted TensorRT model with Selu operator
- Inconsistent inference results between PyTorch and converted TensorRT model with MaxPool2d operator
- Inconsistent inference results between PyTorch and converted TensorRT model with BatchNorm or InstanceNorm operator
- Inconsistent inference results between PyTorch and converted TensorRT model with Interpolate operator
- Inconsistent inference results between PyTorch and converted TensorRT model with ConvTranspose2d operator
- 'tensorrt.tensorrt.Builder' object has no attribute 'build_cuda_engine'
- python model successfully tested on polygraphy tensorrt, but failed, when loading on torch2trt
- torch2trt shows error when converting a model, even though regular pytorch -> onnx -> tensorrt and inference is successful
- [Question & FeatureRequest] Is that possible to convert a torch.nn.Module to TRTMoudle? HOT 1
- Error in converting hybridnets model using torch2trt
- Package is not PEP 517 compliant, making it incompatible with package managing tools
- AttributeError: 'tensorrt_bindings.tensorrt.INetworkDefinition' object has no attribute 'add_convolution'. Did you mean: 'add_convolution_nd'? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from torch2trt.