/
This commit is contained in:
parent
86ac3e855c
commit
ca242edaf3
2 changed files with 18 additions and 10 deletions
8
.idea/.gitignore
generated
vendored
Normal file
8
.idea/.gitignore
generated
vendored
Normal file
|
|
@ -0,0 +1,8 @@
|
||||||
|
# Default ignored files
|
||||||
|
/shelf/
|
||||||
|
/workspace.xml
|
||||||
|
# Editor-based HTTP Client requests
|
||||||
|
/httpRequests/
|
||||||
|
# Datasource local storage ignored files
|
||||||
|
/dataSources/
|
||||||
|
/dataSources.local.xml
|
||||||
|
|
@ -372,13 +372,13 @@ double square(double input) {
|
||||||
return input * input;
|
return input * input;
|
||||||
}
|
}
|
||||||
|
|
||||||
double loss_function(Matrix* output_matrix, int image_label) {
|
//double loss_function(Matrix* output_matrix, int image_label) {
|
||||||
Matrix* temp = matrix_copy(output_matrix);
|
// Matrix* temp = matrix_copy(output_matrix);
|
||||||
|
//
|
||||||
temp->numbers[1, image_label] -= 1;
|
// temp->numbers[1][image_label] -= 1;
|
||||||
apply(square, temp);
|
// apply(square, temp);
|
||||||
|
//
|
||||||
matrix_free(temp);
|
// matrix_free(temp);
|
||||||
|
//
|
||||||
return matrix_sum(temp);;
|
// return matrix_sum(temp);;
|
||||||
}
|
//}
|
||||||
Reference in a new issue