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

Building a forecasting RNN

It's time to build your first recurrent network! It will be a sequence-to-vector model consisting of an RNN layer with two layers and a hidden_size of 32. After the RNN layer, a simple linear layer will map the outputs to a single value to be predicted.

The following imports have already been done for you:

import torch
import torch.nn as nn

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.

class Net(nn.Module):
    def __init__(self):
        super().__init__()
        # Define RNN layer
        self.rnn = ____(
            ____,
            ____,
            ____,
            ____,
        )
        self.fc = nn.Linear(32, 1)
Kodu Düzenle ve Çalıştır