Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ## ---------------------------------------------forward pass----------------------------------------------
- ## x is (N, D) and W1 is (D, hidden) and hence, Z1 is (N, hidden)
- z1 = np.dot(x, W1) + b1
- ## applying activation function
- a1 = relu(z1)
- ## Z1 is (N, hidden) and W2 is (hidden, C) and hence Z2 be should (N, C)
- scores = np.dot(a1, W2) + b2
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement