# Improving the accuracy of a neural network for digit recognition

**URL:** <https://discourse.processing.org/t/improving-the-accuracy-of-a-neural-network-for-digit-recognition/22139>\
**Category:** Coding Questions\
**Created:** [June 24, 2020, 8:17pm UTC](https://discourse.processing.org/t/improving-the-accuracy-of-a-neural-network-for-digit-recognition/22139 "2020-06-24T20:17:29Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![SomeOne](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/someone/32/8639_2.png) [@SomeOne](https://discourse.processing.org/u/SomeOne)\
**Post date:** [June 25, 2020, 10:21am UTC](https://discourse.processing.org/t/improving-the-accuracy-of-a-neural-network-for-digit-recognition/22139/2 "2020-06-25T10:21:08Z")

</div>

There’s only one bias per neuron. Not one for each weight. calculation should be

> [@paulgoux](#):
>
> ```auto
> for (int i = 0; i < inputs.length; i++) {
> input += inputs[i].output * weights[i] ;
> }
> output = lookupSigmoid(input+bias);
> 
> ```

As an activation function [ReLU](https://en.wikipedia.org/wiki/Rectifier_(neural_networks)) would probably work better than sigmoid. It’s so much faster to calculate and at least in deep neural networks it gives about as good results as sigmoid.

Multilayer perceptrons are not that good with scaling or moving. Convolutional networks work much better with images. Still you should be able to get ~98% training accuracy with mnist data using multilayer perceptrons

---

_[View the full topic](https://discourse.processing.org/t/improving-the-accuracy-of-a-neural-network-for-digit-recognition/22139)._
