lxdv / ecg-classification

ECG Arrhythmia classification using CNN
MIT License
241 stars 71 forks source link

Are the ECGResnet34 outputs probabilities? #40

Open mah533 opened 2 years ago

mah533 commented 2 years ago

Hello,

If my understanding is right: The dimension of the output of the model is (batch size * number of classes). Logically, I would expect the elements in the second dimension (with dimension of number of classes) sum up to 1, i.e., they should represent the probability of belonging to that class. So the index of the maximum of the elements would identify the class of the input.

but, in my case at least, the elements do not sum up to 1 and I believe one normalization step (softmax function) should be added as the last layer to make the sum equal to 1.

Thanks for your input,

E