thtang / CheXNet-with-localization

Weakly Supervised Learning for Findings Detection in Medical Images
https://www.csie.ntu.edu.tw/~yvchen/f106-adl/doc/HTCMedical.pdf
GNU General Public License v3.0
316 stars 108 forks source link

ValueError: Target and input must have the same number of elements #5

Closed EyalRozenberg1 closed 6 years ago

EyalRozenberg1 commented 6 years ago

calculating loss between tensors that don't have the same size of elements outputs & labels_sub [64,8] & [64,7]

ValueError: Target and input must have the same number of elements. target nelement (448) != input nelement (512)

https://github.com/thtang/CheXNet-with-localization/blob/a5c0c8b05cc6a1d8b3b527a1882100d770ad2f5b/train.py#L170

thtang commented 6 years ago

Modify N_CLASSES for your application. https://github.com/thtang/CheXNet-with-localization/blob/a5c0c8b05cc6a1d8b3b527a1882100d770ad2f5b/train.py#L137

EyalRozenberg1 commented 6 years ago

My mistake! Thanks

2018-06-11 16:10 GMT+03:00 T.H. Tang notifications@github.com:

Modify N_CLASSES for your application.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/thtang/CheXNet-with-localization/issues/5#issuecomment-396237687, or mute the thread https://github.com/notifications/unsubscribe-auth/AkecczHOfzcl5pPvwdgZC8vCH-vlHdMnks5t7mw-gaJpZM4UieRD .