Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Machine Learning for Healthcare Analytics Projects

You're reading from  Machine Learning for Healthcare Analytics Projects

Product type Book
Published in Oct 2018
Publisher Packt
ISBN-13 9781789536591
Pages 134 pages
Edition 1st Edition
Languages

Optimizing the number of neurons

Let's now move on to tuning the number of neurons in each of these layers. Since we are following the same steps as the preceding sections, we will go through all these steps and do a recap with the code snippet at the end. So, let's get started with the following steps:

  1. We will start by copying the code from the cell used in the Finding the optimal hyperparameters section, and paste it in a new cell. In this new cell, we will play around with the number of neurons by modifying some of the variables.
  2. We will convert the total number of neurons present in each hidden layer into variables, such as neuron1 and neuron2. We will also define these variables in the create_model() function, so that they are called every time we execute it.
  3. We will also change the kernel_initializer and activation values to tanh and normal, since those were the...
lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime}