Dot Product: Vector Ć Vector
BasicsA single neuron multiplies each input by its weight and sums the results ā that's a dot product. Here we compute it manually element-by-element, then show how np.dot does it in one line. ⢠Both vectors must have equal length. ⢠Commutative: np.dot(a, b) = np.dot(b, a).
Multiply each weight w_i by its input x_i, then sum: (0.2Ć1) + (0.8Ć2) + (ā0.5Ć3) = 0.3. Add bias 0.1 ā output 0.4.
Python
Shift+Enter to run
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
Step 0 / 0
Speed
Write Python code and press Shift+Enter or click "Run" to visualize.
Run the operation to see step-by-step explanation.