This is a demo of 2d gaussian generating image.
- Pre-generate coordinates for drawing gaussian image rather than using grid sample.
- Speedup training time by using less initialization sample points and increase the number gradually.
- Use tanh to parse parameters which gives larger gradient at the beginning of training.
- Less code, easier to understand.
python run.py
With 3000 sample points, you should have at least 16GB gpu memory. The code only uses L1 loss for supervision. It will be better using other losses.
Example of 3 random gaussian
Result of 10 epoch