How to export unet gan learner?

Hi,

I want to export my GAN learner for inference, but it seems FastAI doesn’t support this. What are my options for workarounds? Has anyone put a GAN learner into production?

If I try to save the file then load it from another module I get the following exception, despite loading it in exactly the same way as in my notebook:

RuntimeError: Error(s) in loading state_dict for GANModule:
Missing key(s) in state_dict: “generator.layers.0.0.weight”, “generator.layers.0.1.weight”,… [lots more]
Unexpected key(s) in state_dict: “opt_func”, “loss_func”, “metrics”, “true_wd”, “bn_wd”, “wd”, “train_bn”, “model_dir”, “callback_fns”, “cb_state”, “model”, “data”, “cls”.

Thanks,

Kris