Question 1: Short answer
easyAI-checkedRecurrent Neural NetworksA batch contains 8 weather sequences, each covering 20 hours, with 3 measurements per hour (temperature, humidity and wind speed).
import torch
import torch.nn as nn
rnn = nn.RNN(input_size=3, hidden_size=16, batch_first=True)
out, h_n = rnn(torch.randn(8, 20, 3))
The shape of out is and the shape of h_n is .
Fill in every blank (hints in the boxes). Enter moves to the next blank.