zxcvbnmkj
zxcvbnmkj
preds_softmax = preds_softmax.gather(1,labels.view(-1,1)) 处出现 index 2 is out of bounds for dimension 1 with size 2
I am not majoring in biology or medicine, and I don't quite understand how to find related smiles on ChemBL website. May I ask if you could provide "structure_files/chembl.smiles"? Or...
您的代码真的非常好,简洁易懂,教程详细,非常感谢您的无私分享,但是我运行时注意到代码尚且存在两点小问题【(1)与(2)】所以特此发起了Pull 请求 (1)def forward(self, preds, labels):函数中的内容您忘了缩进了 (2)第45行: alpha = self.alpha.to(preds.device)忘记在alpha前面加上self了,使用cuda时会报错--alpha和label不在一个设备上。 (3)原先的loss返回方式只有sum和mean两种,我新增加了一种batch_size方式。