Build a model
Once you've defined an input layer and an output layer, you can build a Keras model. The model object is how you tell Keras where the model starts and stops: where data comes in and where predictions come out.
Questo esercizio fa parte del corso
Advanced Deep Learning with Keras
Istruzioni dell'esercizio
- Import
Modelfromkeras.modelsto create a keras model. - Use the input layer and output layer you already defined as the model's input and output.
Esercizio pratico interattivo
Prova a risolvere questo esercizio completando il codice di esempio.
# Input/dense/output layers
from tensorflow.keras.layers import Input, Dense
input_tensor = Input(shape=(1,))
output_tensor = Dense(1)(input_tensor)
# Build the model
from tensorflow.keras.models import ____
model = ____(____, ____)