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

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.]]
主站蜘蛛池模板: 祁门县| 广宗县| 项城市| 丹东市| 那坡县| 凤山市| 垦利县| 金堂县| 鄂托克旗| 腾冲县| 正蓝旗| 高邮市| 元谋县| 凌源市| 东明县| 观塘区| 富裕县| 茌平县| 郑州市| 禹州市| 会理县| 景宁| 彩票| 香港| 安康市| 新巴尔虎左旗| 台安县| 穆棱市| 尉犁县| 毕节市| 宜都市| 安丘市| 科技| 会东县| 化州市| 鄂温| 株洲市| 普兰店市| 麻栗坡县| 昌邑市| 湘西|