Neuronetz_FertigV2

This commit is contained in:
Efe Turhan 2025-11-26 13:29:01 +01:00
parent a8fbf37709
commit 241242a1f6
4 changed files with 5 additions and 4 deletions

1
.idea/vcs.xml generated
View File

@ -2,5 +2,6 @@
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$" vcs="Git" />
<mapping directory="$PROJECT_DIR$/Neuronetz_V2" vcs="Git" />
</component>
</project>

View File

@ -16,11 +16,11 @@ static unsigned short readUShort(FILE *file) {
return value;
}
// DONE: Vervollständigen Sie die Funktion readImages unter Benutzung Ihrer Hilfsfunktionen
GrayScaleImageSeries *readImages(const char *path)
{
GrayScaleImageSeries *series = NULL;
FILE *file = fopen(path, "rb"); // "rb" ist wichtig für Windows!
FILE *file = fopen(path, "rb"); // "rb" damit zeilenumbrüpche nicht korrigiert werden
if (file == NULL) {
return NULL;

2
main.c
View File

@ -34,7 +34,7 @@ int main(int argc, char *argv[])
if(predictions != NULL)
{
/* HIER: Wir übergeben jetzt auch das 'model' an die Visualisierung */
/* übergeben jetzt auch das 'model' an die Visualisierung */
showMnist(windowWidth, windowHeight, series, predictions, model);
free(predictions);

View File

@ -33,7 +33,7 @@ void setMatrixAt(MatrixType value, Matrix matrix, unsigned int rowIdx, unsigned
matrix.buffer[rowIdx * matrix.cols + colIdx] = value;
}
}
/* um das eindimensionale arry umzurechenen rechnet um wo splaten und zeile ist */
MatrixType getMatrixAt(const Matrix matrix, unsigned int rowIdx, unsigned int colIdx)
{
if (matrix.buffer != NULL && rowIdx < matrix.rows && colIdx < matrix.cols) {