Failed to deserialize model using Imagenet-Console


I’m trying to use imagenet-console from jetson-inference on a custom model. It works fine with FP16, but for FP32, I get the following error:

[GIE] network profiling complete, writing code to …caffemodel.1.tensorcache
[GIE] completed writing cache to …caffemodel.1.tensorcache
[GIE] …caffemodel loaded
[GIE] failed to allocate -1 bytes to deserialize model
failed to load …caffemodel
imageNet – failed to initialize
imagenet-console: failed to initialize imageNet

How can I fix this? Thanks.


In case this issue comes from loading the incorrect FP16 cache file.
Could you delete the …caffemodel.1.tensorcache file and try it again?



That doesn’t appear to be the issue.


Could you test your model with TensorRT app directly?

cp -r /usr/src/tensorrt/ .
cd tensorrt/samples/
cd ../bin/
./giexec --deploy=/path/to/prototxt --output=/name/of/output


When I test the model without using sudo, it gives me the following error:

Input “data”: 3x224x224
Output “prob”: 1000x1x1
cudnnEngine.cpp (55) - CUDA Error in initializeCommonContext: 4
could not build engine
Engine could not be created
Engine could not be created

However, when I ran the same command with sudo, it worked fine.

Is the user you are running the program as a member of group “video”? See:

grep video /etc/groups

(this gives access to the GPU)

Yes, it is.

“strace” has a lot of output, but you might be able to get a useful subset of messages. If your program is “program arg1”, then it would go something like this while running as your regular user and without sudo:

strace program arg1 2>&1 | egrep -i permission

Is there a problem if I just run the command with sudo? The main error that I’m trying to fix is the failure to deserialize the model.

The strace is just to see where the permissions went wrong. I’m guessing you shouldn’t need to run as root, and if that is the case, then you might see a location where permissions failing provides other clues. You can just run as root.


Here is a similar topic:

Could you try if the last comment also works for you?
I have the same problem with inference running in docker. I found the problem.
You need to set the right CUDA_ARCH for your GPU

For example
export CUDA_ARCH=“50 52”


What would be the correct CUDA_ARCH for the tx1?

5.3 so CUDA_ARCH=“53”

Unfortunately, setting CUDA_ARCH didn’t work either.


We don’t meet such issue before.
Could you try to re-flash your device with JetPack to check if issue still occurs?


Hi rtk1357,

Have you resolved the problem? Any result can be shared?



I’ve decided to put this issue aside for now to work on other things.