(x, axis)
| 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) |
no test coverage detected
searching dependent graphs…