Review linear algebra and calculus essentials for ANNs
Nerd Cafe
1. Linear Algebra Essentials for ANNs
Vectors & Matrices
import numpy as np
x = np.array([1, 2, 3]) # Input vectorW = np.array([[1, 2], [3, 4]]) # Weight matriximport numpy as np
# Vectors
v1 = np.array([1, 2, 3])
v2 = np.array([4, 5, 6])
# Matrices
m1 = np.array([[1, 2], [3, 4]])
m2 = np.array([[5, 6], [7, 8]])
print("Vector v1:", v1)
print("Matrix m1:\n", m1)Output
Output:
Key Notes:
Output
Matrix Transpose
Python Example:
Output
Special Matrices
Python Example:
Output
2. Calculus Essentials
Derivatives and Gradients
Math:
Output

Partial Derivatives
Output:
The Chain Rule
Math:
Example
Python Example:
Output
Last updated