Comments (13)
Haha, if only I could!
I ended up being pretty happy with the results of this run, even though it was fairly slow (~7 sec/iter if I got a V100)
!unet_stylegan2 --data jpegs/ --attn-layers [1,2] --batch-size 32 --gradient-accumulate-every 8 --aug-prob 0.25 --aug-types [translation,cutout,color]
Closing the issue since I'm satisfied with the output.
from unet-stylegan2.
@lucidrains Thanks! I'm very new to this, if it isn't obvious.
I tried the following and also got pretty quick mode collapse.
!unet_stylegan2 --data jpegs/ --attn-layers [1,2] --aug-prob 0.25
9k iterations:
I feel like drastically increasing the batch size has given me the best results of what I've tried, but I'm really struggling to find a balance where my results are good+diverse, but it doesn't take >15secs per iteration to train.
Are there any other tricks to consider, aside from batch size?
from unet-stylegan2.
I have. with very similar results
from unet-stylegan2.
Thanks! I'll try running that today and report back.
from unet-stylegan2.
@erdavis1 you are working in the realm of small data, so i would suggest turning on augmentation! you can do so with --aug-prob 0.25
from unet-stylegan2.
@erdavis1 there actually isn't any contrastive regularization in unet-stylegan2, i removed it since it doesn't fit within the unet discriminator framework
from unet-stylegan2.
Have you tried plain stylegan2, without the unet? github.com/lucidrains/stylegan2-pytorch
from unet-stylegan2.
@erdavis1 try with augmentation, but with an effective batch size of 64. That means just a batch size of 32 and the gradient accumulate every of 2
from unet-stylegan2.
The following ended up in a very quick mode collapse, unfortunately:
unet_stylegan2 --data jpegs/ --attn-layers [1,2] --batch-size 32 --gradient-accumulate-every 2 --aug-prob 0.25
For my knowledge, what differences would you expect to see in a model trained with an effective batch size of 64 (batch size 32, gradient accumulate every 2) vs. one also with effective batch size 64 (batch size 8, gradient accumulate every 8)
from unet-stylegan2.
@erdavis1 i updated the augmentation code in v0.5.0 if you'd like to give that a try. --aug-prob 0.25 --aug-types [translation,cutout,color]
from unet-stylegan2.
Good news and bad news.
Using the following, I experienced less mode collapse!
unet_stylegan2 --data jpegs/ --attn-layers [1,2] --batch-size 32 --gradient-accumulate-every 2 --aug-prob 0.25 --aug-types [translation,cutout,color]
It partially collapsed around 18k:
and fully collapsed around 21k:
The images do seem to be a bit more smeary/blurry than the test with a higher gradient-accumulate-every, but I'm not sure if that's related to that, or to the augmentation.
This is a big improvement, and ran pretty quickly at 2secs/iteration. I'm wondering if I slowly edge up the effective batch size, I'll hit upon a level where there's less collapse and clearer results without sacrificing too much speed. I am in no rush, and if I get nice results I'll wait as long as I need to.
from unet-stylegan2.
@erdavis1 get more data! lol
from unet-stylegan2.
🚀🚀
from unet-stylegan2.
Related Issues (11)
- Problems with parameters in face generation HOT 15
- U2Net
- I cannot make generate_interpolation work
- Error while resume training HOT 1
- About the original code of the Unet Gan HOT 2
- For the pre-trained model HOT 2
- Implement Pytorch's built-in AMP instead of APEX HOT 1
- Mode collapse with Flowers dataset HOT 2
- Checkerboard pattern in decoder output for 256x256 input HOT 3
- Discriminator decoder not working with cuda.amp.autocast HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from unet-stylegan2.