- Neural Network Programming with TensorFlow
- Manpreet Singh Ghotra Rajdeep Dua
- 68字
- 2021-07-02 15:17:08
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.]]
推薦閱讀
- GitHub Essentials
- Python金融大數(shù)據(jù)分析(第2版)
- Learning Spring Boot
- 大數(shù)據(jù)導(dǎo)論
- 區(qū)塊鏈通俗讀本
- 軟件成本度量國家標準實施指南:理論、方法與實踐
- “互聯(lián)網(wǎng)+”時代立體化計算機組
- 計算機組裝與維護(微課版)
- Web Services Testing with soapUI
- 從實踐中學(xué)習(xí)sqlmap數(shù)據(jù)庫注入測試
- 智慧城市中的大數(shù)據(jù)分析技術(shù)
- Access數(shù)據(jù)庫開發(fā)從入門到精通
- SQL Server 2008寶典(第2版)
- NoSQL數(shù)據(jù)庫原理(第2版·微課版)
- 數(shù)據(jù)挖掘與數(shù)據(jù)化運營實戰(zhàn):思路、方法、技巧與應(yīng)用