数组的最内部维度

Inner most dimension of an Array

数组的哪个维度称为数组的最内层维度? 我正在浏览一些 tensorflow 文档 "ctc loss",其中描述了一种称为数组最内层维度的行话。 在我看来,答案可能有三种可能。 1. 从右边看最左边。 2. 如果我们从左边看,最右边。 3.中间,如果我们从两边看。

谁能解释一下 what innermost dimension means here?。谢谢解答我的疑惑。

显然,本文档中的最里面用于数组中的最后一个维度。 对于 tensorflow,可以肯定的是,代码注释比文档更有效。 tensorflow的官方文档还是很烂

如果我们参考tensorflowrepo,可以得到答案:

// The order of entries in "dim" matters: It indicates the layout of the
// values in the tensor in-memory representation.
//
// The first entry in "dim" is the outermost dimension used to layout the
// values, the last entry is the innermost dimension. This matches the
// in-memory layout of RowMajor Eigen tensors.

(强调我的)

这与 numpy 数组的默认(行优先,也称为 C 样式)布局相同,其中最后一个维度被认为是最里面的,因为它 varies the fastest.