TensorFlow 面试题与答案
Question: What is the purpose of the tf.GradientTape in TensorFlow?Answer: tf.GradientTape is used for automatic differentiation in TensorFlow. It records operations for computing gradients, allowing you to calculate gradients with respect to variables.Example: x = tf.constant(3.0) with tf.GradientTape() as tape: tape.watch(x) y = x * x dy_dx = tape.gradient(y, x) |
保存以便复习
收藏此条目、标记为困难题,或将其加入复习集合。
这有帮助吗? 是 否
用户评价最有帮助的内容: