Do we need to manually apply activation after FC layer? #1248
Unanswered
gadithyaraju21
asked this question in
General
Replies: 2 comments
-
Yes, I think there is no problem for applying |
Beta Was this translation helpful? Give feedback.
0 replies
-
follow up question from someone in a similar situation, would you have to set up num_classes to be 1 or does it have to be 2? I would think that since its binary classification, 1 would be enough but I am not sure how it works here. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
I am using a pre trained RESNET50D for a binary calssification task. During training I use the BCEWithLogitsLoss() as the criterion as this combines sigmoid and BCE loss. During validation, I apply the Sigmoid() activation to the Logits outputed from the FC layers output neurons (2 in my case) and then perfom argmax to obtain the predictions. Is this the right approach? I taced the code in different fucntion and found that there is no activation function applied to the output nerurons.
Beta Was this translation helpful? Give feedback.
All reactions