我是tensorflow的noob,我开始研究“ Getting Started With TensorFlow “教程。 在本教程中,有一个图形的图像。在这张图中,我找不到关于范围和等级节点的解释。我觉得这两个节点用于求和范围(0和N-1)和数据秩:
是这样吗?
当图形中有这样一个节点时,是否可以使用doc:
https://www.tensorflow.org/api_docs/python/tf/range
https://www.tensorflow.org/api_docs/python/tf/rank
你说得对 range 和 Rank 在图片上对应 tf.range 和 tf.rank tensorflow中的ops。他们不是来自广场本身(你可以看到 Square 操作如下),但来自 tf.reduce_sum :
range
Rank
tf.range
tf.rank
Square
tf.reduce_sum
loss = tf.reduce_sum(tf.square(linear_model - y)) # sum of the squares
如果您查看中的源代码 tensorflow/python/ops/math_ops.py ,您可以在中清楚地看到它们 _ReductionDims 函数,由使用 tf。减少\u总和
tensorflow/python/ops/math_ops.py
_ReductionDims
tf。减少\u总和