- TensorFlow 2.0 Quick Start Guide
- Tony Holdroyd
- 79字
- 2021-06-24 16:02:04
Transposing TensorFlow and matrix multiplication
To transpose a matrix and matrix multiplication eagerly, use the following:
u = tf.constant([[3,4,3]])
v = tf.constant([[1,2,1]])
tf.matmul(u, tf.transpose(a=v))
The output will be as follows:
<tf.Tensor: id=555345, shape=(1, 1), dtype=int32, numpy=array([[14]], dtype=int32)>
Note, again, that the default integer type is tf.int32 and the default float type is tf.float32.
All of the operations that are available for tensors that form part of a computational graph are also available for eager execution variables.
There is a complete list of these operations at https://www.tensorflow.org/api_guides/python/math_ops.
推薦閱讀
- 精通MATLAB神經網絡
- Hands-On Data Science with SQL Server 2017
- CSS全程指南
- 自動檢測與傳感技術
- 電腦上網直通車
- 流處理器研究與設計
- WordPress Theme Development Beginner's Guide(Third Edition)
- 運動控制器與交流伺服系統的調試和應用
- 項目管理成功利器Project 2007全程解析
- 菜鳥起飛系統安裝與重裝
- Salesforce for Beginners
- 從零開始學PHP
- 精通數據科學:從線性回歸到深度學習
- LMMS:A Complete Guide to Dance Music Production Beginner's Guide
- 電氣控制與PLC原理及應用(歐姆龍機型)