Exemple #1
0
 def g():
     return tf.func_capture(lambda: x)
Exemple #2
0
 def f():
     cx = tf.func_capture(lambda: x)
     # Adding `b = tf.func_capture(lambda: x)` will generate two captures
     return cx + cx  # should capture x just once.
Exemple #3
0
 def f():
     cglob = tf.func_capture(lambda: glob)
     return cglob[-1] + tf.constant(0)
Exemple #4
0
 def f():
     cd = tf.func_capture(lambda: d)
     return cd["val"]
Exemple #5
0
 def tf_g():
     cx = tf.func_capture(lambda: x)
     return cx