IniziaInizia gratis

Train a deep CNN with pooling to classify images

Training a CNN with pooling layers is very similar to training of the deep networks that y have seen before. Once the network is constructed (as you did in the previous exercise), the model needs to be appropriately compiled, and then training data needs to be provided, together with the other arguments that control the fitting procedure.

The following model from the previous exercise is available in your workspace:

Convolution => Max pooling => Convolution => Flatten => Dense

Questo esercizio fa parte del corso

Image Modeling with Keras

Visualizza il corso

Istruzioni dell'esercizio

  • Compile this model to use the categorical cross-entropy loss function and the Adam optimizer.
  • Train the model for 3 epochs with batches of size 10.
  • Use 20% of the data as validation data.
  • Evaluate the model on test_data with test_labels (also batches of size 10).

Esercizio pratico interattivo

Prova a risolvere questo esercizio completando il codice di esempio.

# Compile the model
____

# Fit to training data
____

# Evaluate on test data 
____
Modifica ed esegui il codice