yifanai / video2anime

Turn your videos (and selfies) into anime with generative adversarial network (GAN)
Other
26 stars 14 forks source link

How did you manage to minify model size? #1

Closed ofirkris closed 12 months ago

ofirkris commented 5 years ago

Hi, thanks for sharing this interesting project.

I'm curious, I compared results from original TF implementation and results seem identical (well done). How did you manage shrink original pre-trained checkpoint 100 from 8GB to 1GB? Have you tried training on different images (not girl only dataset)?

yifanai commented 5 years ago

@ofirkris

  1. To shrink the original checkpoint: I first wrote the simplified code to build the anime generator portion only of the TensorFlow graph. Then I restored the weights and biases from the original checkpoint into the smaller graph, and saved the smaller graph to new checkpoint. The original checkpoint contains so many other things (e.g. training, discriminator), so it's much bigger.
  2. No I have not trained on other images yet. I might do that next 😄. I saw someone posted their result from training on more images (like male celebrity dataset) on Reddit or Slack (forgot where exactly), it seemed promising.