2021
07-09
07-09
pytorch 实现计算 kl散度 F.kl_div()
先附上官方文档说明:https://pytorch.org/docs/stable/nn.functional.htmltorch.nn.functional.kl_div(input,target,size_average=None,reduce=None,reduction='mean')Parametersinput?Tensorofarbitraryshapetarget?Tensorofthesameshapeasinputsize_average(bool,optional)?Deprecated(seereduction).Bydefault,thelossesareaveragedovereachlosselementinthebatch.Notethatforsomelo...
继续阅读 >