cc-ai / climategan

Code and pre-trained model for the algorithm generating visualisations of 3 climate change related events: floods, wildfires and smog.
https://thisclimatedoesnotexist.com
GNU General Public License v3.0
72 stars 18 forks source link

v3+ update #177

Closed vict0rsch closed 3 years ago

vict0rsch commented 3 years ago

from https://github.com/CoinCheung/DeepLab-v3-plus-cityscapes/blob/master/models/deeplabv3plus.py

vict0rsch commented 3 years ago

python test_trainer.py succeeds.

Additional manual checks:

dl = torch.load("/miniscratch/_groups/ccai/data/pretrained_models/deeplabv3/model_CoinCheungDeepLab-v3-plus.pth")

# check encoder
assert (trainer.G.encoder.conv1.weight == dl['backbone.conv1.weight'].cuda()).all()
# check seg decoder's aspp
assert (trainer.G.decoders["s"].decoder.conv_low.conv.weight == dl['decoder.conv_low.conv.weight'].cuda()).all()
# check seg decoder's decoder
assert (trainer.G.decoders["s"].aspp.conv4.conv.weight == dl['aspp.conv4.conv.weight'].cuda()).all()