Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dynamic graph survey #11019

Merged

Conversation

tonyyang-svail
Copy link

@tonyyang-svail tonyyang-svail commented May 29, 2018

Survey on Differentiable Programming through Dynamic Graph. Discussions are welcomed.

In all four frameworks, a computation graph is built at every iteration. And There are two ways to represent the graph.

### 1) Tape
Dynet uses tape (also known as Wengert list). Consider the following code snippet of an auto-encoder.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems a misconception of "tape" here. Tape, according to this well-known paper in the AD field, is a "log stream" generated by running a program

Derivatives are typically computed by recording a ‘tape’ of the computation and interpreting (or run-time compiling) a transformation of the tape played back in reverse.
This tape is a different kind of entity than the original program.

but not a "representation" of the program.

I did noticed that in this well-know tutorial, it says

The nodes themselves are stored in a common array (Vec) that is shared by the entire expression graph, which also acts as the allocation arena. In AD literature, this shared array is often called a tape (or Wengert list).

This saying is very misleading, as it follows:

The tape can be thought of as a record of all the operations performed during the evaluation of the expression, which in turn contains all the information required to compute its gradient when read in reverse.)

The problem is -- the tape IS a record, but not "can be thought of".

@panyx0718 panyx0718 self-requested a review May 31, 2018 04:57
@tonyyang-svail tonyyang-svail force-pushed the dynamic_graph_survey branch 2 times, most recently from aee3708 to b258c12 Compare June 11, 2018 21:36
Copy link
Contributor

@kexinzhao kexinzhao left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM after offline discussion with @tonyyang-svail.

@tonyyang-svail tonyyang-svail merged commit f15504e into PaddlePaddle:develop Jun 12, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants