MCPcopy Create free account
hub / github.com/MegEngine/MegEngine / _get_softmax_axis

Function _get_softmax_axis

imperative/python/megengine/functional/nn.py:1016–1019  ·  view source on GitHub ↗
(ndim: int)

Source from the content-addressed store, hash-verified

1014
1015
1016def _get_softmax_axis(ndim: int) -> int:
1017 if ndim in (0, 1, 3):
1018 return 0
1019 return 1
1020
1021
1022def softmax(inp: Tensor, axis: Optional[int] = None) -> Tensor:

Callers 1

softmaxFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected