jantic / DeOldify

A Deep Learning based project for colorizing and restoring old images (and video!)
MIT License
17.97k stars 2.56k forks source link

Error in GAN training #497

Closed sj681 closed 7 months ago

sj681 commented 7 months ago

Thanks a lot for all your great work! I am trying to train the network following the training instructions in "ColorizeTrainingStable.ipynb"

The pretrain generator seems to work fine, and I can use the checkpoint from that, as does the critic pretrain. The GAN cycle when you feed in these checkpoints, it runs an epoch but when you try and use the checkpoint from this it says:

_RuntimeError: Error(s) in loading state_dict for DynamicUnetWide: Missing key(s) in statedict: "layers.0.0.weight", "layers.0.1.weight", "layers.0.1.bias", ..... Lists all layers

I assume the checkpoint hasnt saved properly - any help would be greatly appreciated.

for some more information I'm training on the coco dataset. So I have set the Path as the path to the training images, then converted it to B&W using the inbuilt function.