-
-
Save sohailalam2/b257bbfd586b55c00ae9b47bf1099dc2 to your computer and use it in GitHub Desktop.
softmax function implementation in js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let softmax = (arr) => (index) => Math.exp(arr[index]) / arr.map(y => Math.exp(y)).reduce((a, b) => a + b); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment