Hi. I want to run “Lesson 7 superres-gan.ipynb”. I changed nothing except for “def create_gen_learner():
return unet_learner(dls_gen, arch, loss_func=loss_gen,
blur=True, norm_type=NormType.Weight, self_attention=True, y_range=y_range)”.
The seperate generator and discriminator worked fine. But for the conbined GAN part, there was NO explicit error occured. However, the Loss Fuction went MAD, and the final result was even worse than that from a single generator with only 2+5 pretrained epoch. Here is the training loss table:
epoch | train_loss | valid_loss | gen_loss | crit_loss | time |
---|---|---|---|---|---|
0 | 12596.871094 | 25337.402344 | 25337.402344 | 0.005103 | 06:14 |
1 | 12834.087891 | 25337.972656 | 25337.972656 | 0.003986 | 06:08 |
2 | 12249.953125 | 25339.482422 | 25339.482422 | 0.000229 | 06:07 |
3 | 12877.161133 | 25339.265625 | 25339.265625 | 0.000035 | 06:06 |
4 | 12719.675781 | 25338.826172 | 25338.826172 | 0.000181 | 06:07 |
5 | 12512.574219 | 25338.322266 | 25338.322266 | 0.000594 | 06:05 |
6 | 12442.252930 | 25339.253906 | 25339.253906 | 0.022051 | 06:06 |
7 | 12861.764648 | 25336.236328 | 25336.236328 | 0.013215 | 06:07 |
8 | 12772.199219 | 25335.718750 | 25335.718750 | 0.000296 | 06:06 |
9 | 12471.197266 | 25334.681641 | 25334.681641 | 0.000260 | 06:06 |
And here is the corresponding result:
There is no error message in the whole notebook. The only suspicious reminding message was that “UserWarning: You are shadowing an attribute (generator) that exists in the learner. Use self.learn.generator
to avoid this
warn(f"You are shadowing an attribute ({name}) that exists in the learner. Use self.learn.{name}
to avoid this” in the cell “learn.fit(10, lr, wd=wd)”.
Could anyone help me out? Thanks very much.