Models and layers
In deep learning literature, a model refers to the neural network itself, specifically, the neural network architecture. As discussed in Chapter 2, Getting Started With Deep Learning Using Python, a neural network consists of basic components, such as layers, neurons, and connections, in between layers. TF.js provides two functions with which to create these models—tf.model and tf.sequential. tf.model helps you to get more sophisticated architectures, such as skipping certain layers, whereas tf.sequential provides a way to create linear stacks of layers without skipping, branching, and so on.
TF.js provides different types of dedicated layers for different types of tasks—tf.layers.dense, tf.layers.dropout, tf.layers.conv1d ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access