BaşlayınÜcretsiz Başlayın

Compile a neural network

Once you have constructed a model in Keras, the model needs to be compiled before you can fit it to data. This means that you need to specify the optimizer that will be used to fit the model and the loss function that will be used in optimization. Optionally, you can also specify a list of metrics that the model will keep track of. For example, if you want to know the classification accuracy, you will provide the list ['accuracy'] to the metrics keyword argument.

Bu egzersiz

Image Modeling with Keras

kursunun bir parçasıdır
Kursu Görüntüle

Egzersiz talimatları

Write code to compile the model with the 'adam' optimizer and 'categorical_crossentropy' as the loss function.

Uygulamalı interaktif egzersiz

Bu örnek kodu tamamlayarak bu egzersizi bitirin.

# Compile the model
model.____(optimizer=____, 
           loss=____, 
           metrics=['accuracy'])
Kodu Düzenle ve Çalıştır