ymzis69 / AlphaRefine_TensorRT

This repo only includes tensorRT version of AlphaRefine module, not including other base trackers
GNU General Public License v3.0
17 stars 1 forks source link

AttributeError: 'function' object has no attribute 'named_modules' #3

Open wangshuang-jiayou opened 1 year ago

wangshuang-jiayou commented 1 year ago

/usr/local/lib/python3.6/dist-packages/torch/include/ATen/core/TensorBody.h:354:7: note: declared here T data() const { ^~~~ [3/3] c++ prroi_pooling_gpu.o prroi_pooling_gpu_impl.cuda.o -shared -L/usr/local/lib/python3.6/dist-packages/torch/lib -lc10 -lc10_cuda -ltorch_cpu -ltorch_cuda -ltorch -ltorch_python -L/usr/local/cuda/lib64 -lcudart -o _prroi_pooling.so Loading extension module _prroi_pooling... 0%| | 1/3085 [00:40<34:37:39, 40.42s/it] Traceback (most recent call last): File "./arena/LaSOT/run_RF_RF.py", line 118, in main() File "./arena/LaSOT/run_RF_RF.py", line 79, in main pred_bbox = RF_module.refine(cv2.cvtColor(img, cv2.COLOR_BGR2RGB), np.array(pred_bbox)) File "./pytracking/refine_modules/refine_module.py", line 60, in refine output = self.refine_network.forward_test(Cpatch_tensor, mode='test', convert_trt=self.convert_trt) # (1,1,H,W) File "./ltr/models/SEx_beta/SEcm_mbv2.py", line 86, in forward_test backbone_mbv2_256_trt = torch2trt(self.extract_backbone_features, [test_imgs.view(-1, test_imgs.shape[-3:])]) File "/usr/local/lib/python3.6/dist-packages/torch2trt-0.4.0-py3.6.egg/torch2trt/torch2trt.py", line 773, in torch2trt with ConversionContext(network, torch2trt_kwargs=kwargs, builder_config=config, logger=logger) as ctx: File "/usr/local/lib/python3.6/dist-packages/torch2trt-0.4.0-py3.6.egg/torch2trt/torch2trt.py", line 436, in init for name, module in torch2trt_kwargs['module'].named_modules(): AttributeError: 'function' object has no attribute 'named_modules'

大神求帮助看看问题出在哪里呀。我的torch torchvision torch2trt版本和你一模一样