TensorFlow 面试题与答案
Question: Explain the purpose of the tf.function input_signature parameter.Answer: The input_signature parameter in tf.function specifies the input signature of the function. It helps in static shape checking, allowing TensorFlow to optimize the function for a specific input signature.Example: @tf.function(input_signature=[tf.TensorSpec(shape=(None,), dtype=tf.float32)]) def my_function(x): return x * x |
保存以便复习
收藏此条目、标记为困难题,或将其加入复习集合。
这有帮助吗? 是 否
用户评价最有帮助的内容: