Open ankitkpr93 opened 4 years ago
I am also facing this same issue. Any help is appreciated.
I'm also having the same issue!
I also face this issue
Same problem.
same
same problem
Same problem!So,Anyone can help?
I also am facing this issue. Has anyone found a solution?
Was anyone successful? Got the same error!
me too :(
me too :(
Any solution to the issue... I'm struggling to convert the fasterrcnn_resnet50_fpn... here is the script I used and the error message I got.
import torch
from torch2trt import torch2trt
from torchvision.models.detection import fasterrcnn_resnet50_fpn
# create some regular pytorch model...
model = fasterrcnn_resnet50_fpn(pretrained=True).eval().cuda()
# create example data
x = torch.ones((1, 3, 224, 224)).cuda()
# convert to TensorRT feeding sample data as input
model_trt = torch2trt(model, [x])
/miniconda3/envs/deep_learning/lib/python3.6/site-packages/torchvision/ops/boxes.py:101:
UserWarning: This overload of nonzero is deprecated:
nonzero()
Consider using one of the following signatures instead:
nonzero(*, bool as_tuple) (Triggered internally at /opt/conda/conda-bld/pytorch_1595629427286/work/torch/csrc/utils/python_arg_parser.cpp:766.)
keep = keep.nonzero().squeeze(1)
Warning: Encountered known unsupported method torch.Tensor.__iter__
Traceback (most recent call last):
File "./test/model2trt.py", line 12, in <module>
model_trt = torch2trt(model, [x])
File "/home/arunkumar/miniconda3/envs/deep_learning/lib/python3.6/site-packages/torch2trt-0.1.0-py3.6.egg/torch2trt/torch2trt.py", line 531, in torch2trt
File "/home/arunkumar/miniconda3/envs/deep_learning/lib/python3.6/site-packages/torch/nn/modules/module.py", line 722, in _call_impl
result = self.forward(*input, **kwargs)
File "/home/arunkumar/miniconda3/envs/deep_learning/lib/python3.6/site-packages/torchvision/models/detection/generalized_rcnn.py", line 74, in forward
for img in images:
File "/home/arunkumar/miniconda3/envs/deep_learning/lib/python3.6/site-packages/torch/tensor.py", line 456, in <lambda>
return iter(map(lambda i: self[i], range(self.size(0))))
File "/home/arunkumar/miniconda3/envs/deep_learning/lib/python3.6/site-packages/torch2trt-0.1.0-py3.6.egg/torch2trt/torch2trt.py", line 285, in wrapper
File "/home/arunkumar/miniconda3/envs/deep_learning/lib/python3.6/site-packages/torch2trt-0.1.0-py3.6.egg/torch2trt/converters/getitem.py", line 34, in convert_tensor_getitem
File "/home/arunkumar/miniconda3/envs/deep_learning/lib/python3.6/site-packages/torch2trt-0.1.0-py3.6.egg/torch2trt/converters/getitem.py", line 18, in num_slice_types
TypeError: 'int' object is not iterable
how to solve?
Take a look at the TensorRTx repository, which contains TensorRT implementations of many models, including Faster-RCNN.
same issue, any update ?
Any update ?
Any updates here? It'd be great to have Faster-RCNN supported
Hi, I have been trying to convert the Resnet18_fpn customized Faster-RCNN network using following code.
This code is throwing following error.