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

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.]]
主站蜘蛛池模板: 华亭县| 徐闻县| 景泰县| 花垣县| 新乐市| 北票市| 柳州市| 疏附县| 张家港市| 凤庆县| 大理市| 公主岭市| 新龙县| 凤翔县| 莱阳市| 曲阜市| 汾阳市| 濮阳县| 敦化市| 铁力市| 吴江市| 浙江省| 明水县| 托克托县| 陆丰市| 大名县| 商水县| 兴业县| 呼图壁县| 甘泉县| 常山县| 玉林市| 高陵县| 磐安县| 鹿邑县| 界首市| 安远县| 望都县| 马鞍山市| 龙陵县| 西乌|