I use the load_checkpoint with the saved model-symbol.json and model-0000.params . But I get the Error:
File "/home/csf/anaconda3/envs/mxnet/lib/python3.6/site-packages/mxnet/model.py", line 424, in load_checkpoint
tp, name = k.split(':', 1)
ValueError: not enough values to unpack (expected 2, got 1)
I see the source code and find in the function load_checkpoint, it expect the saved params have the keys with a prefix, so that can be splited by :, however, I directly load the saved params use nd.load(), I don’t find the expected prefix?
I use the save_params() and save_parameters(), but get the same result.
Have a look at this tutorial to learn how to save/load parameters in MXNet:
You shouldn’t load the parameters directly with nd.load(), but use .load_parameters() on your block in Gluon.
If you want to save your Gluon model for use in a symbolic fashion, you need to make sure you model is hybridized and then you can use the HybridBlock.export() API.
If you share a bit more your use-case and code I’ll be able to guide you better.