温习一下,写着玩. import torch import torch.nn as nn import numpy as np import torch.optim as optim class RNN(nn.Module): def __init__(self,input_dim , hidden_dim): super(RNN,self).__init__() self._rnn = nn.RNN(input_size = input_dim , hidden_size= hidden_di…