IOError: Invalid decryption. Unable to open file (File signature not found) tlt-prune command

Hi,

I am facing error when:
tlt-prune -pm /workspace/output/Faster-rcnn/frcnn_kitti.epoch11.tlt -o /workspace/output -pth 0.7 -k $KEY
command fired.

error:

Using TensorFlow backend.
Traceback (most recent call last):
File “/usr/local/bin/tlt-prune”, line 10, in
sys.exit(main())
File “./common/magnet_prune.py”, line 169, in main
File “./common/magnet_prune.py”, line 105, in run_pruning
File “./common/utils.py”, line 154, in decode_to_keras
IOError: Invalid decryption. Unable to open file (File signature not found)

please help me…

Thanks in Advance.

Hi sdeep038,
Could you please double check $KEY is correct and frcnn_kitti.epoch11.tlt is available?

As mentioned in tlt-prune error: IOError: Invalid decryption. Unable to open file (File signature not found) - TAO Toolkit - NVIDIA Developer Forums ,
please run tlt-train against hdf5 file(pre-trained model from ngc) firstly and will get the tlt format file. Then run tlt-prune against the tlt format file."

Hi morganh,
Thanks for quick response.

I have downloaded pre-trained model with .h5 resnet50 .after training I have .tlt file.
Is it possible tlt-prune against tlt file format?

Thanks

Yes, after training aginst pre-trained model, you will get a tlt format file.
Then it is possible to run tlt-prune against it.

I got your point but I did same steps but still get error…
What should I do?

Thanks

Could you please double check $KEY is correct and frcnn_kitti.epoch11.tlt is available?

How can I know $key is correct or not?

Thanks

See “Get an NGC API key” from tlt doc at Integrating TAO Models into DeepStream — TAO Toolkit 3.22.05 documentation . Make sure your $KEY is ngc API key.

If you already know your key,you can also type the $key explicitly in your command.

I have checked key it is correct.

Thanks

Could you please check /workspace/output/Faster-rcnn/frcnn_kitti.epoch11.tlt is available?
And how about running against other tlt files under that folder(/workspace/output/Faster-rcnn)?

Yes it is available

Thanks

Hi sdeep038,
Could you please double check your $KEY? Did you export the correct ngc API key into $KEY?

On my side, if I type a wrong key into command, I can reproduce the same error as yours.
So, it is high possibility that there is something wrong in your $KEY.

I would tell you an easy method to ignore typing $KEY.
If your $KEY is abcedfg, then you can type it explicitly in your command as below.

tlt-prune -pm /workspace/output/Faster-rcnn/frcnn_kitti.epoch11.tlt -o /workspace/output -pth 0.7 -k abcdefg

Can I create key multiple time?
Bcz I forgot the key given at training model time.

Hi sdeep038,
You can login NVIDIA NGC for help.

Click Generate API Key to create your own API Key. If you have forgotten or lost your API Key, you can come back to that page to create a new one at any time.

Hi ,

still i am facing an issue…

Thanks

Hi sdeep038,
Could you attach your frcnn_kitti.epoch11.tlt here?
I will test it on my side with my key.

Hi Sdeep038,
As we synced offline,please check your ngc key setting in training spec. Retain again with your new key got from ngc.
Also please check if other notebooks work well.

Hi Morganh,

Sorry for late reply.
After using new KEY we are able to prune the model.
Thank You.

But I have one question:
Que:What is the need to give key at training time?

waiting for your reply…

Thanks.

You can search “$API_KEY” in tlt doc.
$API_KEY is needed in training spec, tlt-converter, etc.

I understood but why we gave $API_KEY at training time?
that’s my question.
i understood while downloading model from cloud we have to give API_KEY.
but what is the need to give key at training time?

Thanks…