mundher / local-global

Official implementation of Lung Nodule Classification using Deep Local-Global Networks using PyTorch
MIT License
23 stars 17 forks source link

Predict question #6

Closed AlejandraM97 closed 3 years ago

AlejandraM97 commented 3 years ago

I have a question Mr, Mundher @mundher. Why do you shorten the size of the predict and target vectors at the end of the predict function? Normally, do you use 255 to test, right? After you do that .view the data now is 86. Could you explain to me why?

all_pred = all_pred.view(-1, 3).mean(dim=1) all_targets = all_targets.view(-1, 3).mean(dim=1)

mundher commented 3 years ago

That's because the actual size of the test in this fold is 86. And each of these examples was augmented 3 times. Therefore, they became 256. However, I just need to report the results for the 86 examples. So for each example, I averaged its augmented versions as shown in the code.

If I took the average of all examples directly, I would give me different results and it's wrong.

On Sun, Aug 22, 2021, 5:32 PM Alejandra Moreno @.***> wrote:

I have a question Mr, Mundher @mundher https://github.com/mundher. Why do you shorten the size of the predict and target vectors at the end of the predict function? Normally, do you use 255 to test, right? After you do that .view the data now as 86. Could you explain to me why?

all_pred = all_pred.view(-1, 3).mean(dim=1) all_targets = all_targets.view(-1, 3).mean(dim=1)

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/mundher/local-global/issues/6, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABCRN4RSXHTX5CAZJPEWEL3T6EKBPANCNFSM5CTB3VIQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email .

AlejandraM97 commented 3 years ago

Now I understand, I was really confused about it, and it makes sense. Thank you very much!