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

Multi-output model evaluation

In this exercise, you will practice model evaluation for multi-output models. Your task is to write a function called evaluate_model() that takes an alphabet-and-character-predicting model as input, runs the evaluation loop, and prints the model's accuracy in the two tasks.

You can assume that the function will have access to dataloader_test. The following imports have already been run for you:

import torch
from torchmetrics import Accuracy

Once you have implemented evaluate_model(), you will use it in the following exercise!

Bu egzersiz, kursun bir parçasıdır

Intermediate Deep Learning with PyTorch

Kursa Göz Atın

Uygulamalı etkileşimli egzersiz

Bu egzersizi bu örnek kodu tamamlayarak deneyin.

def evaluate_model(model):
    # Define accuracy metrics
    acc_alpha = ____(____, ____)
    acc_char = ____(____, ____)
Kodu Düzenle ve Çalıştır