keras_demo.py
from the course repo.Here is a model $f$ with two hidden layers relating $x \mapsto y$:
$$ f(x) = g_2(W_2g_1(W_1x + b_1) + b_2). $$
Sequential
model class, Sequential
model class is simplest, but limited to a linear
topology for layers. tf.data.Dataset.from_tensor_slices()
..shuffle()
and .batch()
methods. Sequential()
and the resulting model's .add()
method to add layers.Sequential()
. Sequential()
is in tf.keras.models
.tf.keras.layers
..compile()
method. .fit()
method with the training and fit methods..evaluate()
and/or .predict()
methods. kernel_regularizer
argument and an l1()
or l2()
instance from
tf.keras.regularizers
. Dropout()
can be added as a layer affecting the previous Dense()
layer. Sequential()
model class for models with a linear topology of
layers, the functional API for more complex topologies.