Neuronetz_FertigV2
This commit is contained in:
parent
a8fbf37709
commit
241242a1f6
1
.idea/vcs.xml
generated
1
.idea/vcs.xml
generated
@ -2,5 +2,6 @@
|
|||||||
<project version="4">
|
<project version="4">
|
||||||
<component name="VcsDirectoryMappings">
|
<component name="VcsDirectoryMappings">
|
||||||
<mapping directory="$PROJECT_DIR$" vcs="Git" />
|
<mapping directory="$PROJECT_DIR$" vcs="Git" />
|
||||||
|
<mapping directory="$PROJECT_DIR$/Neuronetz_V2" vcs="Git" />
|
||||||
</component>
|
</component>
|
||||||
</project>
|
</project>
|
||||||
@ -16,11 +16,11 @@ static unsigned short readUShort(FILE *file) {
|
|||||||
return value;
|
return value;
|
||||||
}
|
}
|
||||||
|
|
||||||
// DONE: Vervollständigen Sie die Funktion readImages unter Benutzung Ihrer Hilfsfunktionen
|
|
||||||
GrayScaleImageSeries *readImages(const char *path)
|
GrayScaleImageSeries *readImages(const char *path)
|
||||||
{
|
{
|
||||||
GrayScaleImageSeries *series = NULL;
|
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) {
|
if (file == NULL) {
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|||||||
2
main.c
2
main.c
@ -34,7 +34,7 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
if(predictions != NULL)
|
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);
|
showMnist(windowWidth, windowHeight, series, predictions, model);
|
||||||
|
|
||||||
free(predictions);
|
free(predictions);
|
||||||
|
|||||||
2
matrix.c
2
matrix.c
@ -33,7 +33,7 @@ void setMatrixAt(MatrixType value, Matrix matrix, unsigned int rowIdx, unsigned
|
|||||||
matrix.buffer[rowIdx * matrix.cols + colIdx] = value;
|
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)
|
MatrixType getMatrixAt(const Matrix matrix, unsigned int rowIdx, unsigned int colIdx)
|
||||||
{
|
{
|
||||||
if (matrix.buffer != NULL && rowIdx < matrix.rows && colIdx < matrix.cols) {
|
if (matrix.buffer != NULL && rowIdx < matrix.rows && colIdx < matrix.cols) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user