taki0112 / UGATIT

Official Tensorflow implementation of U-GAT-IT: Unsupervised Generative Attentional Networks with Adaptive Layer-Instance Normalization for Image-to-Image Translation (ICLR 2020)
MIT License
6.17k stars 1.04k forks source link

The size of ckpt is 7.5G? #32

Closed cumtwb closed 5 years ago

cumtwb commented 5 years ago

I trained the network on my own dataset. But the size of saved checkpoint is 7.5G. Would you like to tell how much space your checkpoint occupies?

heart4lor commented 5 years ago

in my case one single ckpt occupies ~1.5G, but I set --light parameter to true because of poor GPU memory.

HLearning commented 5 years ago

in my case one single ckpt occupies ~1.6G, but I set --light parameter to true because of poor GPU memory.

thewaifuai commented 5 years ago

Using the light parameter my checkpoints were about 1.5G each.

cumtwb commented 5 years ago

Thank you! But I still have two problem:

  1. Why the checkpoint of UGATIT is so huge? The ckpt of MUNIT is 100~150M, of CycleGAN is only ~40M.
  2. The unique difference of setting the --light parameter to true or false is in the MLP function of AdaLIN. If --light==true, global average pooling will be used to input x. The output unit number of next fc layer is 64 4(ch n_res)=256.
light false true
x 64 64 256 256
fc 64 64 256 * 256 256 * 64

A float32 parameter occupies 4B, all parameters of one full fc layer occupy 64 64 256 256 4B = 1G. Therefore, the full a2b and b2a generators should occupy ~2G than the light generators. But my full ckpt occupies ~7.5G, is 6G than your light ckpt. Why? @heart4lor @HLearning @thewaifuai

mchalecki commented 5 years ago

Original checkpoint(not light model) size is 7.5G