What are the best practices to load a pre-trained pytorch model in Julia (e.g. Flux.jl)?
In my current case, it is only MLP.
I am going to check the FastAI.jl
Hi, I have the same question.
Have you made a success of trying FastAI.jl to load a pre-trained pytorch model?
Hi, in my project, I kept using Pytorch finally, so I did not try it out in Julia.
You may try to find some tutorials in FastAI.
The problem is that the PyTorch saved model format does not contain enough information to reconstruct the model without knowing what the model structure is ahead of time. You’d have the same problem trying to load PyTorch weights into a TF or JAX model. How libraries like Metalhead.jl and Transformers.jl handle this is by keeping a known list of models for which we can specify direct mappings between PyTorch → Julia. This is somewhat manual, but you could try reusing the utility functionality from either library for your own code to save some work.