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

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)
主站蜘蛛池模板: 蓬溪县| 天全县| 清镇市| 镇原县| 闻喜县| 广德县| 新郑市| 长子县| 桑日县| 东乡族自治县| 镇康县| 宜宾市| 建宁县| 原平市| 苍山县| 江永县| 昌江| 商河县| 揭西县| 喀喇沁旗| 富锦市| 十堰市| 武定县| 阳城县| 平阳县| 工布江达县| 井研县| 大田县| 吴忠市| 古交市| 右玉县| 伊通| 沙河市| 绥棱县| 泸西县| 海兴县| 新丰县| 呼玛县| 重庆市| 闽清县| 左贡县|