-
Notifications
You must be signed in to change notification settings - Fork 193
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Serialization Error in verifyHeader: 0 #32
Comments
@jin-wong1031 Were you able to fix it? |
The reason for this error is that ActionAI gives us the TensorRT engine for the pose detection model. Since these engine files are GPU specific, they won't run on your machine. You need to build your own engine from the original Pytorch model. Download this Pytorch model https://drive.google.com/open?id=1XYDdCUdiF2xxx4rznmLb62SdOUZuoNbd I got it from the trt_pose repository. You must have already got the human_pose.json file with you. Use the following code to build your own TensorRT engine:
And now, its done. place the new resnet18_baseline_att_224x224_A_epoch_249_trt.pth file in the models folder. |
sounds like it's the big difference between Jetson and respiberrypi. the model in Jetson is Nvidia GPU specialized. so if you deploy actionAI in another platform(like respiberrypi), you would meet this issue. |
sorry, I am wrong. I think it once again, may it's because the version of tensorRT, so we need convert the original models into the typical version of tensorRT, so the converted trt model the author providing is no longer suit to our person of tensorRT. in other word, one version of tensorRT model may not be used in another version,so I have to convert it locally. an I right? best regards |
i done the installation and ran python3 iva.py 0, errors occur:
[TensorRT] ERROR: ../rtSafe/coreReadArchive.cpp (31) - Serialization Error in verifyHeader: 0 (Magic tag does not match)
[TensorRT] ERROR: INVALID_STATE: std::exception
[TensorRT] ERROR: INVALID_CONFIG: Deserialize the cuda engine failed.
Traceback (most recent call last):
File "iva.py", line 39, in
model_trt.load_state_dict(torch.load(OPTIMIZED_MODEL))
File "/usr/local/lib/python3.6/dist-packages/torch/nn/modules/module.py", line 815, in load_state_dict
load(self)
File "/usr/local/lib/python3.6/dist-packages/torch/nn/modules/module.py", line 810, in load
state_dict, prefix, local_metadata, True, missing_keys, unexpected_keys, error_msgs)
File "/usr/local/lib/python3.6/dist-packages/torch2trt/torch2trt.py", line 309, in _load_from_state_dict
self.context = self.engine.create_execution_context()
AttributeError: 'NoneType' object has no attribute 'create_execution_context'
Any ideas?
seems related to the model...did you test your model on jetson nano?
The text was updated successfully, but these errors were encountered: