Skip to content

Instantly share code, notes, and snippets.

@santi-pdp
Created January 24, 2018 17:53
Show Gist options
  • Save santi-pdp/d0e9002afe74db04aa5bbff6d076e8fe to your computer and use it in GitHub Desktop.
Save santi-pdp/d0e9002afe74db04aa5bbff6d076e8fe to your computer and use it in GitHub Desktop.
Toy example in pytorch for binary classification
Display the source blob
Display the rendered blob
Raw
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@mdja
Copy link

mdja commented Sep 27, 2020

BCEWithLogitsLoss() expects logits as inputs and not probabilities, so you shouldnt do y = self.out_act(a3)

But he's using BCELoss not BCEWithLogitsLoss

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment