Skip to content

Commit

Permalink
Update loss_functions.py
Browse files Browse the repository at this point in the history
  • Loading branch information
bfortuner committed Jul 26, 2018
1 parent a636f3a commit 143b60a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions code/loss_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@
### Functions ###

def CrossEntropy(yHat, y):
if yHat == 1:
return -log(y)
if y == 1:
return -log(yHat)
else:
return -log(1 - y)
return -log(1 - yHat)


def Dice(yHat, y):
Expand Down

0 comments on commit 143b60a

Please sign in to comment.