# core.HasMask

``` python
core.HasMask()
```

Which output positions count, e.g. non-padding tokens.

False positions change neither the data fit nor the curvature.

## Methods

| Name                                  | Description               |
|---------------------------------------|---------------------------|
| [mask](#laplacekit.core.HasMask.mask) | The positions that count. |

### mask

``` python
core.HasMask.mask(f, inputs, /)
```

The positions that count.

#### Parameters

| Name   | Type    | Description                | Default    |
|--------|---------|----------------------------|------------|
| f      | Outputs | Model outputs for a batch. | *required* |
| inputs | Inputs  | The batch’s inputs.        | *required* |

#### Returns

| Name | Type | Description |
|----|----|----|
|  | Tensor \| None | A bool tensor shaped like `log_prob`’s output, `[N, *positions]`, True where a position counts. `None` when every position counts. |
