$50 if you can get my GAN working outside my notebook


I trained a neural network for a class project and the deadline is approaching, but I’ve run into a problem. I’ll pay $50 to whoever helps me fix my issue. I’d prefer to use Venmo for payment but we can discuss other options. To earn the $50, your solution has to get my GAN learner working in my web app (without retraining it).

When I try to export my GAN learner for inference, I get an exception: AttributeError: Can’t pickle local object ‘gan_loss_from_func…_loss_G’

If I try to save the learner (rather than export) then load it from a python module, I get the following exception when I try to load the pth file (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”.

I’m using FastAI v1



1 Like

I’m not interested in the money, But I can look into it if you just share the notebook, preferably in colab?

Hi Kris,

Happy to help feel free to ping me at kam [AT] rocketfreights.com

Quick hold on this. I may have got it working. Not sure what I’m doing differently but if it works i’m going to go with it.