arnoweng / CheXNet

A pytorch reimplementation of CheXNet
557 stars 215 forks source link

I have an error with the first line of the code. the error is about 'tuple' object is not callable #36

Open mahsa14775 opened 3 years ago

mahsa14775 commented 3 years ago

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(), volatile=True) output = model(input_var) output_mean = output.view(bs, n_crops, -1).mean(1) pred = torch.cat((pred, output_mean.data), 0)

AUROCs = compute_AUCs(gt, pred) AUROC_avg = np.array(AUROCs).mean()

alaadewer commented 3 years ago

i have the same error. if you solved it, plz tell me how you did that