Last active
March 10, 2022 12:54
-
-
Save sbugrov/f58d3b655c318b5ca2b4b4cbe7615257 to your computer and use it in GitHub Desktop.
This file contains 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
int main(int argc, const char * argv[]) { | |
for (unsigned i = 0; i != 50; ++i) { | |
vector<float> pred = sigmoid(dot(X, W, 4, 4, 1 ) ); | |
vector<float> pred_error = y - pred; | |
vector<float> pred_delta = pred_error * sigmoid_d(pred); | |
vector<float> W_delta = dot(transpose( &X[0], 4, 4 ), pred_delta, 4, 4, 1); | |
W = W + W_delta; | |
}; | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment