Thank you very much ptrblck for the working example.
I double checked it and find that it is because I try to load the python “.pkl” file. It seems to me that in C++, only “.pt” file can be loaded and saved.
Thanks again