Open Candyeeee opened 4 years ago
Hello, what is your graphics card, And what is the version of Cuda and Pytorch? Thank You
I have the same problem
I have the same problem
I solved this
` model = torch.nn.DataParallel(model).cuda()
modelCheckpoint = torch.load(pathModel)['state_dict']
for k in list(modelCheckpoint.keys()):
index = k.rindex('.')
if (k[index - 1] == '1' or k[index - 1] == '2'):
modelCheckpoint[k[:index - 2] + k[index - 1:]] = modelCheckpoint[k]
del modelCheckpoint[k]
model.load_state_dict(modelCheckpoint)`
I solve it when my torch version is 1.7.1 because i found the pull requset by [dgrechka] (https://github.com/zoogzog/chexnet/pull/21) and use it's weights to my code.
And i also found that whether the model is parallel is important. Because i set model = model.cuda()
, it will make the result so bad. Why i set it is my only one gpu.
Hope it helpful~
Hi, when I run the provided code I cannot achieve the given prediction results. However, the mean predicted AUROC was very low (0.518). Can you help me find why? Thank you very much.