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

Function softmax

code/chapter6.py:19–21  ·  view source on GitHub ↗
(x)

Source from the content-addressed store, hash-verified

17
18
19def softmax(x):
20 e_x = np.exp(x - np.max(x, axis=-1, keepdims=True))
21 return e_x / e_x.sum(axis=-1, keepdims=True)
22
23
24class LayerBase(ABC):

Callers 3

fitMethod · 0.90
fitMethod · 0.90
fitMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected