Number of units and layers in neural network

Take house price as example, how we can choose number of units and layers? I am not sure about this, somebody help.

Hi @jiatong_xu ,

Welcome to the community! This is your first post :slight_smile:

Regarding your question: “How we can choose number of units and layer”, I’d like to share with you another post where this exact question is answered:

Please read that post and let me know if this clarifies your question.

Thanks!

Juan

Moved this thread to MLS course 2 week 1.

is there any technique to find the right number of layers and units? Or we can only find it by changing after we get an output?

I’d say that there’s not a specific technique to find the right number of layers and units. It will depend on the specific case at stake. Experience will be one source, and other similar models can be another source, but definitively, the experimentation with your model is the best source for that.

And may be if we want to define a technique, then it could be this: Fast iteration. Prof Ng mentions this in several points of the lessons in his specializations.

Come up with a model and run it. Quickly. And learn, and fine tune and run it again, and repeat this until you reach your objective.

So yes, that would be the ‘technique’. :slight_smile: