Tag Archives: CheXNet-master: CUDA out of memery

CheXNet-master: CUDA out of memery [How to Solve]

add with torch.no_grad() before for i, (inp, target) in enumerate(test_loader): no error will be reported

with torch.no_grad():
    for i, (inp, target) in enumerate(test_loader):
        target = target.cuda()
        gt = torch.cat((gt, target), 0)
        bs, n_crops, c, h, w = inp.size()
        input_var = torch.autograd.Variable(inp.view(-1, c, h, w).cuda())
        output = model(input_var)
        output_mean = output.view(bs, n_crops, -1).mean(1)
        pred = torch.cat((pred, output_mean.data), 0)

But the effect is not good

The average AUROC is 0.531
The AUROC of Atelectasis is 0.552835646499197
The AUROC of Cardiomegaly is 0.4891981635698571
The AUROC of Effusion is 0.5078801344734772
The AUROC of Infiltration is 0.5471494224277326
The AUROC of Mass is 0.5019205110036506
The AUROC of Nodule is 0.48564796421763534
The AUROC of Pneumonia is 0.49787587924670523
The AUROC of Pneumothorax is 0.46888930706822896
The AUROC of Consolidation is 0.45797680791836254
The AUROC of Edema is 0.5500617972215441
The AUROC of Emphysema is 0.7189693346796524
The AUROC of Fibrosis is 0.548014619318718
The AUROC of Pleural_Thickening is 0.47339353023337755
The AUROC of Hernia is 0.638215609588036