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

Output layer using shared layer

Now that you've looked up how "strong" each team is, subtract the team strengths to determine which team is expected to win the game.

This is a bit like the seeds that the tournament committee uses, which are also a measure of team strength. But rather than using seed differences to predict score differences, you'll use the difference of your own team strength model to predict score differences.

The subtract layer will combine the weights from the two layers by subtracting them.

Bu egzersiz

Advanced Deep Learning with Keras

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

Egzersiz talimatları

  • Import the Subtract layer from keras.layers.
  • Combine the two-team strength lookups you did earlier.

Uygulamalı interaktif egzersiz

Bu örnek kodu tamamlayarak bu egzersizi bitirin.

# Import the Subtract layer from tensorflow.keras
from tensorflow.keras.layers import ____

# Create a subtract layer using the inputs from the previous exercise
score_diff = ____()([____, ____])
Kodu Düzenle ve Çalıştır