Open wang-TJ-20 opened 2 years ago
how to solve this question
Hi @wang-TJ-20 ,
Thanks for reaching out!
This typically indicates that the TensorRT conversion failed for some reason.
Are you able to share the PyTorch model you're attempting to convert?
Best, John
Same issue here with a P100 GPU... Oddly enough, when I use a T4 everything works smoothly.
File "ai_py/test/test_pose_detect.py", line 67, in
test(img_list, folder)
File "ai_py/test/test_pose_detect.py", line 32, in test
pos_detector = PoseDetector(PiP_IMAGE_DIM, PiP_MODEL_PATH, PiP_POSE_FILE)
File "/home/zitong.wang1/pip/ai_py/worker/PoseDetector.py", line 40, in init
self.model_trt.load_state_dict(torch.load(self.optimized_model))
File "/opt/conda/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1468, in load_state_dict
load(self)
File "/opt/conda/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1462, in load
module._load_from_state_dict(
File "/opt/conda/lib/python3.8/site-packages/torch2trt-0.3.0-py3.8.egg/torch2trt/torch2trt.py", line 538, in _load_from_state_dict
self.context = self.engine.create_execution_context()
AttributeError: 'NoneType' object has no attribute 'create_execution_context'