Example of MLP with Keras

Keras (https://keras.io) is a powerful Python toolkit that allows modeling and training complex deep learning architectures with minimum effort. It relies on low-level frameworks, such as Tensorflow, Theano, or CNTK, and provides high-level blocks to build the single layers of a model. In this book, we need to be very pragmatic because there's no room for a complete explanation; however, all the examples will be structured to allow the reader to try different configurations and options without a full knowledge (for further details, I suggest the book Deep Learning with Keras, Gulli A, Pal S., Packt Publishing).

In this example, we want to build a small MLP with a single hidden layer to solve the XOR problem (the ...

Get Mastering Machine Learning Algorithms now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.