zoogzog / chexnet

Implementation of the CheXNet network (PyTorch)
211 stars 94 forks source link

The mean predicted AUROC is very low (0.518) #23

Open Candyeeee opened 4 years ago

Candyeeee commented 4 years ago

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.

stupidBirdFirstFly commented 3 years ago

Hello, what is your graphics card, And what is the version of Cuda and Pytorch? Thank You

CityChan commented 3 years ago

I have the same problem

JW12138 commented 3 years ago

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)`
hazy-wu commented 2 years ago

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~