Comments (18)
Might be possible to implement improved training in PyTorch now, the merge was done yesterday ๐
from wassersteingan.
@NickShahML you can subscribe to the PR
from wassersteingan.
Hi Anton,
This cannot be implemented in pytorch until we merge the PR pytorch/pytorch#1016 which enables gradients of gradients
from wassersteingan.
@pclucas14 Please follow this PR for info on double backward for convolutions: pytorch/pytorch#1643
from wassersteingan.
I think on your input variable, you can just set requires_grad=True, and then take torch.norm(your_input.grad, 2)
from wassersteingan.
https://github.com/igul222/improved_wgan_training
edit: The early morning getting to me, you wanted pytorch ๐
from wassersteingan.
@atgambardella One needs the gradient of the gradient norm w.r.t. parameters, not the gradient w.r.t. the input
@ccurro This is a tensorflow code. I'm not aware of any pytorch implementation
from wassersteingan.
@aosokin Section 4 of the paper, "Sampling along straight lines says":
The gradient term ||โxหD(xห)||2 is with respect to the points xห, not the parameters of D
from wassersteingan.
@atgambardella agreed, my bad.
However this does not solve the problem. One needs to differentiate this norm, not simply compute it.
from wassersteingan.
@soumith Thanks a lot for your reply! Looking forward to see that happen!
from wassersteingan.
Is there a way to know when this merger has occurred?
from wassersteingan.
Is it possible to implement it in Torch? How can we compute the gradient of the norm of the gradient of D?
from wassersteingan.
This repository has an implementation of it using the new gradients of gradients feature: https://github.com/caogang/wgan-gp.
from wassersteingan.
@jfsantos gradients of gradients? what do you mean by that?
from wassersteingan.
@rafaelvalle For normalizing w.r.t. the norm of the gradients of the discriminator, you need to be able to backprop through that gradient, so you need to compute the gradient of a gradient. This is a recent feature in PyTorch's autograd.
from wassersteingan.
@jfsantos yes! I got confused. w.r.t. the norm of the gradients of the discriminator on the interpolated points between Pr and Pg!
from wassersteingan.
@rafaelvalle @jfsantos but convolutions are not supported yet I believe.
from wassersteingan.
Hi,
does anyone know when convolutions will be supported ?
from wassersteingan.
Related Issues (20)
- After training the model, how to generate Test samples using the generator?
- Where can I find bibtex of Wasserstein GAN and related works? HOT 1
- Why have a tensor of 1 or -1 in loss.backward()? HOT 1
- Problems with the optimization of loss. HOT 4
- cifar10 result not good as expect ! HOT 7
- how to train a 256*128 image dataset and output 256*128 result๏ผ HOT 3
- Results on cifar10 very bad even if trained for over 1000 epochs HOT 1
- The parameter โdb_path' of LSUN setting in 'main.py' should be changed to 'root'
- Results cannot be reproduced. HOT 2
- module name can\'t contain "." HOT 1
- Inconsistent loss function from the paper? HOT 8
- No convergence in onw dataset
- No sigmoid activation for G on MLP?
- should the gamma and beta on batchnormalization layer be clipped?
- some problem when running the WassersteinGAN HOT 1
- Interpreting Generator and Critic loss HOT 1
- How can I use a loss as the stopping criteria in Wasserstein GAN?
- Why did not tell the label to the discriminator
- Generator update HOT 1
- I cannot find the calculating or estimating of wasserstein distance! HOT 3
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 wassersteingan.