官术网_书友最值得收藏!

Ranking (dimensions) of a tensor

The rank of a tensor is the number of dimensions it has, that is, the number of indices that are required to specify any particular element of that tensor.

The rank of a tensor can be ascertained with this, for example:

tf.rank(t2)

The output will be as follows:

<tf.Tensor: id=53, shape=(), dtype=int32, numpy=3>
(the shape is () because the output here is a scalar value)
主站蜘蛛池模板: 来凤县| 新野县| 江津市| 宁化县| 德州市| 莒南县| 安龙县| 平凉市| 平罗县| 南郑县| 兴业县| 车致| 集安市| 温州市| 南安市| 桐乡市| 陇西县| 宁乡县| 尼勒克县| 澄城县| 肥城市| 莎车县| 莱西市| 绥阳县| 安国市| 定南县| 新民市| 宿松县| 博罗县| 彝良县| 连云港市| 中牟县| 汤阴县| 临清市| 都昌县| 巨野县| 土默特左旗| 大新县| 舟曲县| 通州区| 罗城|