You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Have I written custom code (as opposed to using a stock example script provided in TensorFlow): No.
OS Platform and Distribution (e.g., Linux Ubuntu 16.04): Colab.
Mobile device (e.g. iPhone 8, Pixel 2, Samsung Galaxy) if the issue happens on mobile device:
TensorFlow installed from (source or binary): Binary
TensorFlow version (use command below): 2.0.0-alpha0
Python version: 3.6.7 (default, Oct 22 2018, 11:32:17) \n[GCC 8.2.0]
Bazel version (if compiling from source): N/A
GCC/Compiler version (if compiling from source): N/A
CUDA/cuDNN version: ??
GPU model and memory: ??
Describe the current behavior
Code annotated with @tf.function behaves differently depending on whether functions are called and captured as variables, or called and passed directly to other functions.
In particular, it seems the autograph magic doesn't get applied to functions that are only called within the parameter list of other functions.
I may be misinterpreting what exactly is going wrong, but certainly the behavior shown in the colab below is incorrect.
Describe the expected behavior
Capturing via an intermediate variable should never change code behavior.
System information
Describe the current behavior
Code annotated with
@tf.function
behaves differently depending on whether functions are called and captured as variables, or called and passed directly to other functions.In particular, it seems the autograph magic doesn't get applied to functions that are only called within the parameter list of other functions.
I may be misinterpreting what exactly is going wrong, but certainly the behavior shown in the colab below is incorrect.
Describe the expected behavior
Capturing via an intermediate variable should never change code behavior.
Code to reproduce the issue
https://colab.research.google.com/drive/1CcWfHnGkFehUN8LYsbODf_fNSsQncE0G
The text was updated successfully, but these errors were encountered: