torch2trt
torch2trt copied to clipboard
【bug】engine_bytes = state_dict[prefix + "engine"] KeyError: 'engine'
When I call the TORCH2TRT module for Yolo series algorithm reasoning, encountered such error, I hope to get the answer.
D:\Anaconda3\envs\python37\lib\site-packages\torch_tensor.py:1013: UserWarning: The .grad attribute of a Tensor that is not a leaf Tensor is being accessed. Its .grad attribute won't be populated during autograd.backward(). If you indeed want the .grad field to be populated for a non-leaf Tensor, use .retain_grad() on the non-leaf Tensor. If you access the non-leaf Tensor by mistake, make sure you access the leaf Tensor instead. See github.com/pytorch/pytorch/pull/30531 for more informations. (Triggered internally at aten\src\ATen/core/TensorBody.h:417.)
return self._grad
Traceback (most recent call last):
File "D:\hb\yolov7-tiny-obb-master\predict.py", line 13, in
Process finished with exit code 1
thank!
Hello, were you able to resolve his error?