Model Initialization

Learn about the input and output layers of a neural network.

Chapter Goals:

  • Define a class for an MLP model
  • Initialize the model

A. Placeholder

When building the computation graph of our model, tf.compat.v1.placeholder acts as a "placeholder" for the input data and labels. Without the tf.compat.v1.placeholder, we would not be able to train our model on real input data.

A tf.compat.v1.placeholder takes in a required first argument and two keyword arguments called shape and name.

The required argument for the placeholder is its ...

Create a free account to view this lesson.

By signing up, you agree to Educative's Terms of Service and Privacy Policy