Shapes in a Dense Layer
A dense layer computes several weighted output scores per example. Its weight matrix pairs input features with those output units.
- Source
- Anbloq
- Language
- English
- Created
- Updated
- Chapters
- 2
- Reading time
- 1 min
In this article2 chapters
Trace one convention
Rows of an input array can hold examples with three features. Multiplying by weights of shape \((3,2)\) gives two scores per example before adding a compatible bias. Matrix–vector products illustrate the per-example computation.
Check bias placement
A two-element bias can apply one value to each of the two outputs. Shape tests should define the feature, batch, and output axes rather than infer them. See tensor axes.[1]