- TensorFlow 2.0 Quick Start Guide
- Tony Holdroyd
- 88字
- 2021-06-24 16:02:04
Broadcasting
Element-wise tensor operations support broadcasting in the same way that NumPy arrays do. The simplest example is that of multiplying a tensor by a scalar:
t4 = t2*4
print(t4)
The output will be as follows:
tf.Tensor( [[[ 0. 4. 8.] [12. 16. 20.]] [[24. 28. 32.] [36. 40. 44.]]], shape=(2, 2, 3), dtype=float32)
In this example, the scalar multiplier 4 is—conceptually, at least—expanded into an array that can be multiplied element-wise with t2. There is a very detailed discussion of broadcasting at https://docs.scipy.org/doc/numpy/user/basics.broadcasting.html.
推薦閱讀
- Ansible Configuration Management
- PowerShell 3.0 Advanced Administration Handbook
- Managing Mission:Critical Domains and DNS
- 樂高機(jī)器人EV3設(shè)計(jì)指南:創(chuàng)造者的搭建邏輯
- Cloud Analytics with Microsoft Azure
- Effective DevOps with AWS
- ROS機(jī)器人編程與SLAM算法解析指南
- 城市道路交通主動(dòng)控制技術(shù)
- 小型電動(dòng)機(jī)實(shí)用設(shè)計(jì)手冊(cè)
- 機(jī)器學(xué)習(xí)流水線實(shí)戰(zhàn)
- Kubernetes for Developers
- 人工智能:智能人機(jī)交互
- Deep Learning Essentials
- 計(jì)算機(jī)硬件技術(shù)基礎(chǔ)(第2版)
- 基于元胞自動(dòng)機(jī)的人群疏散系統(tǒng)建模與分析