Skip to content

Instantly share code, notes, and snippets.

View aroraakshit's full-sized avatar
:octocat:

Akshit Arora aroraakshit

:octocat:
View GitHub Profile
@aroraakshit
aroraakshit / softmax.py
Created March 30, 2019 21:13 — forked from Hasil-Sharma/softmax.py
Vectorized softmax calculation using numpy
import numpy as np
def softmax(x):
""" Compute the softmax for each row of the input x
Arguments:
x -- A N dimensional veector or M X N dimensional numpy matrix.
Return:
x -- modified x in-place
"""