MCPcopy Create free account
hub / github.com/apache/tvm / _softmax

Function _softmax

tests/python/relax/test_op_vision.py:1497–1500  ·  view source on GitHub ↗
(x, axis)

Source from the content-addressed store, hash-verified

1495 """Numpy reference aligned with ``topi.vision.multibox_transform_loc``."""
1496
1497 def _softmax(x, axis):
1498 x_max = np.max(x, axis=axis, keepdims=True)
1499 exp = np.exp(x - x_max)
1500 return exp / np.sum(exp, axis=axis, keepdims=True)
1501
1502 B, C, N = cls_pred.shape
1503 loc = loc_pred.reshape(B, N, 4)

Callers 1

_multibox_ref_numpyFunction · 0.85

Calls 3

maxMethod · 0.80
expMethod · 0.45
sumMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…