Kommentare
This commit is contained in:
parent
b9ed1f22e0
commit
c748cf5a97
4
matrix.c
4
matrix.c
@ -67,7 +67,7 @@ Matrix add(const Matrix matrix1, const Matrix matrix2)
|
||||
return result;
|
||||
}
|
||||
|
||||
// Case B: matrix1 has shape (rows x cols) and matrix2 is (rows x 1) -> broadcast second across columns
|
||||
// Case B: matrix1 besteht aus (rows x cols) und matrix2 ist (rows x 1) -> einmal alle rows einzeln auf die andere Addieren
|
||||
if (matrix1.rows == matrix2.rows && matrix2.cols == 1 && matrix1.cols > 1)
|
||||
{
|
||||
Matrix result = createMatrix(matrix1.rows, matrix1.cols);
|
||||
@ -84,7 +84,7 @@ Matrix add(const Matrix matrix1, const Matrix matrix2)
|
||||
return result;
|
||||
}
|
||||
|
||||
// Case C: matrix1 is (rows x 1) and matrix2 is (rows x cols) -> broadcast first across columns
|
||||
// Case C: matrix1 ist (rows x 1) und matrix2 ist (rows x cols) -> einmal alle cols einzeln auf die andere Addieren
|
||||
if (matrix2.rows == matrix1.rows && matrix1.cols == 1 && matrix2.cols > 1)
|
||||
{
|
||||
Matrix result = createMatrix(matrix2.rows, matrix2.cols);
|
||||
|
||||
@ -52,8 +52,6 @@ static void prepareNeuralNetworkFile(const char *path, const NeuralNetwork nn)
|
||||
fclose(file);
|
||||
}
|
||||
|
||||
|
||||
|
||||
void test_loadModelReturnsCorrectNumberOfLayers(void)
|
||||
{
|
||||
const char *path = "some__nn_test_file.info2";
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user