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

Create an input layer with multiple columns

In this exercise, you will look at a different way to create models with multiple inputs. This method only works for purely numeric data, but its a much simpler approach to making multi-variate neural networks.

Now you have three numeric columns in the tournament dataset: 'seed_diff', 'home', and 'pred'. In this exercise, you will create a neural network that uses a single input layer to process all three of these numeric inputs.

This model should have a single output to predict the tournament game score difference.

Bu egzersiz

Advanced Deep Learning with Keras

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

Egzersiz talimatları

  • Create a single input layer with 3 columns.
  • Connect this input to a Dense layer with 1 unit.
  • Create a model with input_tensor as the input and output_tensor as the output.
  • Compile the model with 'adam' as the optimizer and 'mean_absolute_error' as the loss function.

Uygulamalı interaktif egzersiz

Bu örnek kodu tamamlayarak bu egzersizi bitirin.

# Create an input layer with 3 columns
input_tensor = ____((____,))

# Pass it to a Dense layer with 1 unit
output_tensor = ____(____)(____)

# Create a model
model = ____(____, ____)

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