Week 1 Handwriting Recognition how to select unit number

Hi

How do we decide the unit numbers. In this particular example Andrew used 25 units. Is there a relation with pixels ? Or intutively we breakdown images ?

Thanks / Cemal

Welcome to the Forum!

It’s determined by experiment. It’s a tradeoff between getting “good enough” performance, and keeping the model small enough that it’s easy to train.

So it is not created by considering image size etc… If we want to create a neural algorithm for similar image processing we should increase unit numbers as much as our compute resources handle. If we have 1 unit per pixel would be the best result ?

@Chem you would/will get much more exposure to this question in later courses (i.e. Convolutional Networks in the DL Specialization)… But lets just say, in practice it is not so much adding more and more units, but actually going deeper with the layers, with various accumulating/amalgamating techniques dispersed in between.

An increase in ‘complexity’ over just ‘quantity’.

1 Like

No, it would not. The purpose of the hidden layers is to learn and summarize the general characteristics of the input features.

1 Like

Thank you @Nevermnd and @TMosh for nice and quick responses.