Created
November 13, 2011 15:08
-
-
Save dmichael/1362199 to your computer and use it in GitHub Desktop.
Neural Network Feedforward
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| m = size(X, 1); | |
| a1 = [ones(m, 1) X]; % Add the biases to the input matrix | |
| z2 = a1 * Theta1'; | |
| a2 = sigmoid(z2); | |
| n = size(a2, 1); | |
| a2 = [ones(n,1) a2]; % Add the biases | |
| z3 = a2 * Theta2'; | |
| h = a3 = sigmoid(z3); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment