Skip to content

Instantly share code, notes, and snippets.

@gognjanovski
Created December 14, 2018 16:43
Show Gist options
  • Save gognjanovski/6c992ecd6767fb788867077594e5a9e2 to your computer and use it in GitHub Desktop.
Save gognjanovski/6c992ecd6767fb788867077594e5a9e2 to your computer and use it in GitHub Desktop.
function p = predict(Theta1, Theta2, X)
...
h1 = sigmoid([ones(m, 1) X] * Theta1');
h2 = sigmoid([ones(m, 1) h1] * Theta2');
[value, p] = max(h2, [], 2);
...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment