函数参数
run(
fetches,
feed_dict=None,
options=None,
run_metadata=None
)
tf.Session.run() 执行 fetches 中的操作,计算 fetches 中的张量值。
这个函数执行一步 TensorFlow 运算,通过运行必要的图块来执行每一个操作,并且计算每一个 fetches 中的张量的值,用相关的输入变量替换 feed_dict 中的值。
fetches 参数可能是一个单一图元素,或者任意嵌套列表,元组,namedtuple,字典,或者有序字典在叶子中包含图元素。
Runs operations and evaluates tensors in fetches
.
This method runs one “step” of TensorFlow computation, by running the necessary graph fragment to execute every Operation
and evaluate every Tensor
in fetches
, substituting the values in feed_dict
for the corresponding input values.
The fetches
argument may be a single graph element, or an arbitrarily nested list, tuple, namedtuple, dict, or OrderedDict containing graph elements at its leaves.
函数参数