"98.8% accuracy on MNIST in 13 minutes training" - that's really slow isn't it? I can probably write vanilla JS or Python code that does that in 10 lines or so and would finish in around 5 seconds.
Why is this taking so long?
Why is this taking so long?
Really? There are certainly frameworks that you can use to achieve this performance in that amount of code, but I would be really interested to see that in vanilla JS/Python.
```js
const dotSign = (v1, v2) => v1.reduce((prev, x, i) => prev + x * v2[i], 1) > 0 ? 1 : -1
module.exports = (data, weights = Array(data[0].content.length).fill(0)) => {
for(const {label, content} of data) {
const delta = (label - dotSign(content, weights)) / 2;
weights = weights.map((x, i) => x + delta * content[i]);
}
return { perceive: vector => dotSign(vector, weights), weights };
}
```I can upload an electron app that does this with mnist if interested.
MNIST has 60k training samples and 10k test samples. Are you using only 400 of them? Is 95% the accuracy on the test samples or on the same set of training samples? I believe when we talk about MNIST accuracy, we always refer to the accuracy on the 10k test samples.