pytorch Dropout错误 noise.bernoulli_(1 - ctx.p).div_(1 - ctx.p) divide by zero
pytorch在计算long和float运算时会出现错误:>>>importtorch>>>a=torch.tensor([1,2,3],dtype=torch.long)>>>a+0.5123[torch.LongTensorofsize(3,)]这对应到在long类型数据使用dropout上时有时会出现如下问题:/usr/local/lib/python3.6/dist-packages/to