import torch.nn as nn
import torch
# gru = nn.GRU(input_size=50, hidden_size=50, batch_first=True)
#...embed = nn.Embedding(3, 50)
# x = torch.LongTensor([[0, 1, 2]])
# x_embed = embed(x)
# out, hidden = gru...(x_embed)
gru = nn.GRU(input_size=5, hidden_size=6,
num_layers=2, # gru层数...h0 = torch.randn(2 * 1, 3, 6) # (D∗num_layers,N,Hout)(是否双向乘以层数,batch size大小,输出维度大小)
output, hn = gru