google / tangent

Source-to-Source Debuggable Derivatives in Pure Python
Apache License 2.0
2.32k stars 434 forks source link

Has tangent being incorporated into Eager Exexution to provide features similar to the script mode of PyTorch 1.0 #85

Closed wangkuiyi closed 6 years ago

wangkuiyi commented 6 years ago

I ask because I noticed that PyTorch 1.0 announced its script mode, which, according to the source code, extracts the AST of the forward pass defined as a Python function, like what tangent does.

The script mode generates a graph to be executed by the Caffe2 runtime, thus differs from tangent that generates Python code. Is it a reasonable idea to make tangent the script mode of Eager Execution?

mdanatg commented 6 years ago

Yes - AutoGraph is a project derived from Tangent that does exactly that!