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

Identity matrix

An identity matrix is a matrix I that does not change any vector, like V, when multiplied by I.

The following example shows how to get the identity matrix for a given size:

import tensorflow as tf

identity = tf.eye(3, 3)

with tf.Session() as sess:
print(sess.run(identity))

The output of this is shown as follows:

[[ 1.  0.  0.] [ 0.  1.  0.] [ 0.  0.  1.]]
主站蜘蛛池模板: 林西县| 明溪县| 长治市| 方城县| 涞源县| 修文县| 项城市| 阜康市| 兴宁市| 灌云县| 隆子县| 云霄县| 西吉县| 龙海市| 夹江县| 湘潭县| 南郑县| 金溪县| 喀什市| 苗栗市| 孙吴县| 武宣县| 金塔县| 晋中市| 大化| 巴里| 岢岚县| 翁源县| 普安县| 成武县| 屏南县| 台山市| 曲阜市| 西盟| 乌鲁木齐市| 韩城市| 万山特区| 宁津县| 南康市| 宁蒗| 广东省|