How to export a Flux model to Python?

Hello!

I have a trained models from Flux.jl which I would like to be able to use in Python. Is there a way to save these models in a format that would be easily readable by Pytorch or Tensorflow?

Thanks!

1 Like

nope. Your best bet is ONNX but IIRC there’s no support for writing from Julia side at the moment

There is, the problem is that the Python libraries can’t read it back in.

Back to the original question, the answer varies greatly depending on whether you’re using TF or PyTorch (i.e. almost no overlap) and whether you want just the weights or a full model specification.