Giter VIP home page Giter VIP logo

Comments (18)

AjayTalati avatar AjayTalati commented on May 29, 2024 7

Might be possible to implement improved training in PyTorch now, the merge was done yesterday ๐Ÿ‘

from wassersteingan.

apaszke avatar apaszke commented on May 29, 2024 5

@NickShahML you can subscribe to the PR

from wassersteingan.

soumith avatar soumith commented on May 29, 2024 2

Hi Anton,

This cannot be implemented in pytorch until we merge the PR pytorch/pytorch#1016 which enables gradients of gradients

from wassersteingan.

jfsantos avatar jfsantos commented on May 29, 2024 1

@pclucas14 Please follow this PR for info on double backward for convolutions: pytorch/pytorch#1643

from wassersteingan.

atgambardella avatar atgambardella commented on May 29, 2024

I think on your input variable, you can just set requires_grad=True, and then take torch.norm(your_input.grad, 2)

from wassersteingan.

ccurro avatar ccurro commented on May 29, 2024

https://github.com/igul222/improved_wgan_training

edit: The early morning getting to me, you wanted pytorch ๐Ÿ˜›

from wassersteingan.

aosokin avatar aosokin commented on May 29, 2024

@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.

atgambardella avatar atgambardella commented on May 29, 2024

@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.

aosokin avatar aosokin commented on May 29, 2024

@atgambardella agreed, my bad.
However this does not solve the problem. One needs to differentiate this norm, not simply compute it.

from wassersteingan.

aosokin avatar aosokin commented on May 29, 2024

@soumith Thanks a lot for your reply! Looking forward to see that happen!

from wassersteingan.

NickShahML avatar NickShahML commented on May 29, 2024

Is there a way to know when this merger has occurred?

from wassersteingan.

fonfonx avatar fonfonx commented on May 29, 2024

Is it possible to implement it in Torch? How can we compute the gradient of the norm of the gradient of D?

from wassersteingan.

jfsantos avatar jfsantos commented on May 29, 2024

This repository has an implementation of it using the new gradients of gradients feature: https://github.com/caogang/wgan-gp.

from wassersteingan.

rafaelvalle avatar rafaelvalle commented on May 29, 2024

@jfsantos gradients of gradients? what do you mean by that?

from wassersteingan.

jfsantos avatar jfsantos commented on May 29, 2024

@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.

rafaelvalle avatar rafaelvalle commented on May 29, 2024

@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.

LukasMosser avatar LukasMosser commented on May 29, 2024

@rafaelvalle @jfsantos but convolutions are not supported yet I believe.

from wassersteingan.

pclucas14 avatar pclucas14 commented on May 29, 2024

Hi,
does anyone know when convolutions will be supported ?

from wassersteingan.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.