# classification_sequence

Python API: `depthai_nodes.node.parsers.utils.classification_sequence`

## Functions

### compute_classification_sequence_scores

```python
def compute_classification_sequence_scores(scores: np.ndarray, *, is_softmax: bool = True) -> np.ndarray:
```

Normalize the layout of per-step classification scores.

Parameters

 * `scores` (`np.ndarray`): Scores or logits of shape `(steps, classes)`, `(1, steps, classes)`, or `(steps, classes, 1)`.
 * `is_softmax` (`bool`): Whether scores already contain probabilities. If false, apply softmax.

Returns

 * `np.ndarray`: Float32 array of shape `(steps, classes)`. Softmax, when requested, runs over classes independently for each
   step.

Raises

 * `ValueError`: If the rank is not 2 or 3, or a 3D tensor has no supported singleton axis.
