JuliaDiff / JuliaDiff/ForwardDiff.jl

Defining different forward/backward pass behavior

Open
#258 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Julia
Stars
1k
Forks
160
PR merge metrics
No merged PRs in 30d

Description

I am trying to port Eric Jang's Gumbel-Softmax code from here:
http://blog.evjang.com/2016/11/tutorial-categorical-variational.html

The part that I am having trouble with is line 27 of the Tensorflow Implementation:
y = tf.stop_gradient(y_hard - y) + y

I believe the desired behavior is to use y_hard on the forward pass but use y to compute gradients on the backwards pass.

How can I achieve this in ForwardDiff (and ReverseDiff too)?

Thanks!

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with line 27 of the linked TensorFlow implementation and compare the requested forward/backward behavior with ForwardDiff and ReverseDiff. Determine whether either project exposes a supported way to express this behavior; done means providing a clear, project-appropriate answer or defining the scope of a new feature.

Written by the indexing model from the issue text.

Assessment

Tech stack
julia, tensorflow
Domain
tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.