Open jooniku opened 1 year ago
Could you provide the python version and OS you are running as I was able to run draw.py on windows, mac and ubuntu, so I could take a look at figuring out why it doesnt work on every platform.
Turned out to be my fault. Didn't look into it enough before.
It seemed to be numpy/opencv error (image below), but I fixed it with upgrading numpy to the latest version. OS was Linux Mint 21.1, python 3.10.12
Works perfectly now. Very impressive accuracy.
Project downloaded 05.10.23, 14:00
Bugs
Commenting
While there are docstring comments on the functions, I found that the comments didn't really add too much information about how the function works. For example, the stochastic gradient descent function: it's a relatively complicated function and the comment doesn't really explain it. If I wouldn't know how sgd works beforehand, it would've been difficult to understand it by reading the code. Perhaps more detailed docstring would make the readability higher.
Variable names
There are some quite short variable names such as "nabla_w", which reduced the readability of the code a bit.
Structure
Many of the functions are quite short and compact, which make them readable. The SGD function is quite long and perhaps things such as monitoring different accuracies could be in a separate function, which is called if necessary.
Perhaps the backpropagation function could be broken up into two separate sections (as in functions).
General
Generally the project looks very good. The code is readable and the functions are compact. The computations themselves (e.g. sigmoid function) are separated from the user interface and compartmentalization has been taken into consideration. Training the network was quick and the instructions were simple to follow. Great job!