Best source of learning for building a model

34 views
Skip to first unread message

Martin Wright

unread,
Aug 30, 2024, 6:39:43 PMAug 30
to Keras-users
Hello,

I am building a model using Keras and am struggling to find meaningful learning material that explains how I need to build my layers and why

What I mean is that there are a ton of articles that say something like:
  1. Load an MNIST dataset
  2. Normalize ir
  3. Create a sequential Keras model
  4. Add a flatten layer and 3 dense layers
  5. Compile the model
  6. Fit test data to the model to verify model performance
Which works with the MNIST dataset but is not useful with a different dataset. What I really want to know is this:
  • Why was there one flatten model followed by 3 dense layers?
  • Why did they choose the layer parameters they did, how did that relate to the input data?
  • Given I know what my data is, how do I decide what layers I need?
  • Ditto, how do I decide what layer parameters I need?
  • How should I handle input data that is not a simple matrix - examples always seem to  refer to MNIST data which is just (say) a 28x28 matrix but my data is more like 1 node which is an integer and has 11 possible values, a 2nd node which is a sequence of numbers, a 3rd which is a floating point number between -27 and +180, etc

Does anyone know of a good source of learning material that will help me find this information?

Thanks

Dennis S

unread,
Aug 30, 2024, 11:10:20 PMAug 30
to Martin Wright, Keras-users
It sounds like you might benefit from general guidance on neural networks, not just Keras. For my social media followers, I recommend "Make Your Own Neural Network" by Tariq Rasheed. Great book, really helped me a lot. Here's the link: https://amzn.to/3TagOpm

Thanks,

Dennis

--
You received this message because you are subscribed to the Google Groups "Keras-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to keras-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/keras-users/2d3f5d5f-ff26-445f-b989-e0ff554ebd6dn%40googlegroups.com.


--
Thanks,

Dennis

Mark Tolani

unread,
Sep 3, 2024, 12:15:41 PMSep 3
to Martin Wright, Keras-users
The size of a NN is a hyperparameter, including number or f hidden layers & numbers of neurons per hidden layer. Needs experimenting to strike a balance between bias (good model) and variance (overfitting). 

There are other hyperparameters as well like learning rate, where you regularize, etc. 

Good source of learning material for deep  learning is Andrew Ng’s Deep Learning specialization on coursera.

Reply all
Reply to author
Forward
0 new messages