MCPcopy
hub / github.com/MingchaoZhu/DeepLearning / softmax

Function softmax

code/chapter7.py:553–555  ·  view source on GitHub ↗
(x)

Source from the content-addressed store, hash-verified

551
552
553def softmax(x):
554 e_x = np.exp(x - np.max(x, axis=-1, keepdims=True))
555 return e_x / e_x.sum(axis=-1, keepdims=True)
556
557
558def line_search(self, y, y_pred, h_pred):

Callers 2

fitMethod · 0.70
fitMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected