CLASS torch.nn.KLDivLoss(size_average=None, reduce=None, reduction='mean', log_target=False)
The Kullback-Leibler divergence loss.
For tensors of the same shape y_{\text{pred}},\ y_{\text{true}}ypred, ytrue, where y_{\text{pred}}ypred is the input
and y_{\text{true}}ytrue is the target
, we define the pointwise KL-divergence as
标签:ypred,nn,text,torch,KLDivLoss,pred From: https://www.cnblogs.com/zjuhaohaoxuexi/p/16709345.html