The role of @tensorflow.function

后端 未结 0 1995
迷失自我
迷失自我 2021-02-06 14:26
import tensorflow as tf
@tf.function
def f(x, y):
  return x ** 2 + y
x = tf.constant([2, 3])
y = tf.constant([3, -2])
f(x, y)

I run this code in colab

相关标签:
回答
  • 消灭零回复
提交回复
热议问题