language model即语言生成模型 character level language model 训练过程 训练过程的输入时给定的,结果是一个向量,进过softmax后就是为各个character的概率 测试过程 输入是前一个的输出,输出是由soft max 之后的概率分布 采样得到的 —————————-…
import torch from torch.autograd import Variable import torch.nn.functional as F import matplotlib.pyplot as plt # make fake data n_data = torch.ones(100, 2) x0 = torch.normal(2*n_…