Compability issue for .pkl extension
We have a model stored as .pkl file which is trained on NVIDIA's StyleGAN. Since its extension is .pkl, and your structure asks for a .pth file, is there any way to convert our .pkl file to .pth file? Or is there any way to work on your system with a .pkl file?
I have the same problem. I also have NVlab's 'Stylegan2-ADA', 'Stylegan2-ADA-PyTorch' models. (.pkl files) #9 suggested a method, but I didn't understand it. I do not know how to load the parameters as NumPy.ndarray. I apologize for such a beginner's question.
Any model weights (ideally) should be stored like a dictionary or a recursive dictionary. Some key-value pairs should be the parameter name-pre-trained weight pairs, where parameter name should be a string and pre-trained weight should be a tensor (pytorch or tensorflow version, both of which can be easily converted to numpy.ndarray). Please Google how to convert a pytorch (or tensorflow) tensor to a numpy.ndarray if you are really new to these two DL frameworks.
So, I would recommend first load the pkl file with ipython, and then check how the file is organized with print() function.