logo

TensorFlow 中 tf.Variable 和 tf.placeholder 有什么区别?

What are the differences between tf.Variable and tf.placeholder in TensorFlow?

题目类型: 技术面试题

这是一道技术面试题,常见于澳洲IT公司面试中。

难度: easy

标签: TensorFlow, ML, Deep Learning

参考答案摘要

维度 tf.Variable tf.placeholder 作用 用于保存 可训练/可更新 的状态(会随训练变化) 用于声明 运行时输入 (值在运行时喂给图) 初始化 需要初始化(例如 global_variables_initializer) 不需要初始化;通过 feed_dict 传入数据 常见场景 权重/偏置、计数器、滑动平均等 输入特征、标签、dropout 参数(TF1.x 常见写法)

本题提供 STAR 原则详细解答和技术解析,登录匠人学院学习中心即可查看完整答案。

← 返回面试题库

TensorFlow 中 tf.Variable 和 tf.placeholder 有什么区别?

Easy

想查看完整答案?

登录匠人学院学习中心,获取 STAR 格式回答和详细技术解析

前往学习中心查看答案