% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/loss.R
\name{nnf_multilabel_one_hot}
\alias{nnf_multilabel_one_hot}
\title{Convert class_id tensor to binary one-hot tensor}
\usage{
nnf_multilabel_one_hot(y, outcomes, device = "cpu")
}
\arguments{
\item{y}{A \code{torch_tensor} of shape \verb{(batch_size, n_levels)} containing
1-based class indices.}

\item{outcomes}{A tibble with factor columns (as from \code{hardhat::mold()$outcomes}).}

\item{device}{Torch device.}
}
\value{
A \code{torch_tensor} of shape \verb{(batch_size, n_classes)} with binary values.
}
\description{
Transforms a tensor of class indices (one column per hierarchy level)
into a binary tensor where each column corresponds to a class.
}
