Skip to content

Instantly share code, notes, and snippets.

@MattLowrieDS
Created January 6, 2021 03:28
Show Gist options
  • Save MattLowrieDS/f6eabe67b8e6f2abae221774833c12ce to your computer and use it in GitHub Desktop.
Save MattLowrieDS/f6eabe67b8e6f2abae221774833c12ce to your computer and use it in GitHub Desktop.
def label_smoothing(y, factor=0.1):
y *= 1 - factor
y += factor / y.shape[1]
return y
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment