第9章リカレントニューラルネットワーク
9.5. Recurrent Neural Network Implementation from Scratch9.5 リカレントニューラルネットワークのゼロからの実装
We are now ready to implement an RNN from scratch. In particular, we will train this RNN to function as a character-level language model (see Section 9.4) and train it on a corpus consisting of the entire text of H. G. Wells’ The Time Machine, following the data processing steps outlined in Section 9.2. We start by loading the dataset.
英語のヒント
%matplotlib inline
import math
import torch
from torch import nn
from torch.nn import functional as F
from d2l import torch as d2l