摘要:
RuntimeError:one of the variables needed for gradient computation has been modified by an inplace operation 原因:0.4.0把Varible和Tensor融合为一个Tensor,inplace 阅读全文
摘要:
torch.distributions.Categorical() 功能:根据概率分布来产生sample,产生的sample是输入tensor的index 如: >>> m = Categorical(torch.tensor([ 0.25, 0.25, 0.25, 0.25 ])) >>> m.s 阅读全文