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

Output layers

Output layers are simply Dense layers! Output layers are used to reduce the dimension of the inputs to the dimension of the outputs. You'll learn more about output dimensions in chapter 4, but for now, you'll always use a single output in your neural networks, which is equivalent to Dense(1) or a dense layer with a single unit.

Bu egzersiz

Advanced Deep Learning with Keras

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

Egzersiz talimatları

  • Import the Input and Dense functions from keras.layers.
  • Create an input layer of shape 1.
  • Again, create a dense layer with 1 unit and pass input_tensor directly to it.

Uygulamalı interaktif egzersiz

Bu örnek kodu tamamlayarak bu egzersizi bitirin.

# Load layers
____

# Input layer
input_tensor = ____(shape=(____,))

# Create a dense layer and connect the dense layer to the input_tensor in one step
# Note that we did this in 2 steps in the previous exercise, but are doing it in one step now
output_tensor = ____(____)(____)
Kodu Düzenle ve Çalıştır