update

abstract fun <T : DType, V> update(predictions: Tensor<T, V>, targets: Tensor<out DType, *>, ctx: ExecutionContext)(source)

Update the metric state with a batch of predictions and targets.

Parameters

predictions

Model outputs (logits or probabilities)

targets

Ground truth labels (class indices or one-hot encoded)

ctx

Execution context for tensor operations