Beispiel #1
0
 def g():
     return tf.func_capture(lambda: x)
Beispiel #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.
Beispiel #3
0
 def f():
     cglob = tf.func_capture(lambda: glob)
     return cglob[-1] + tf.constant(0)
Beispiel #4
0
 def f():
     cd = tf.func_capture(lambda: d)
     return cd["val"]
Beispiel #5
0
 def tf_g():
     cx = tf.func_capture(lambda: x)
     return cx