pub struct MultiLabelClassificationOutput<B: Backend> {
pub loss: Tensor<B, 1>,
pub output: Tensor<B, 2>,
pub targets: Tensor<B, 2, Int>,
}Expand description
Multi-label classification output adapted for multiple metrics.
Supported metrics:
- HammingScore
- Precision (via ConfusionStatsInput)
- Recall (via ConfusionStatsInput)
- FBetaScore (via ConfusionStatsInput)
- Loss
Fields§
§loss: Tensor<B, 1>The loss.
output: Tensor<B, 2>The label logits or probabilities. Shape: [batch_size, num_classes].
targets: Tensor<B, 2, Int>The ground truth labels. Shape: [batch_size, num_classes].
Implementations§
Trait Implementations§
Source§impl<B: Backend> Adaptor<ConfusionStatsInput<B>> for MultiLabelClassificationOutput<B>
impl<B: Backend> Adaptor<ConfusionStatsInput<B>> for MultiLabelClassificationOutput<B>
Source§fn adapt(&self) -> ConfusionStatsInput<B>
fn adapt(&self) -> ConfusionStatsInput<B>
Adapt the type to be passed to a metric.
Source§impl<B: Backend> Adaptor<HammingScoreInput<B>> for MultiLabelClassificationOutput<B>
impl<B: Backend> Adaptor<HammingScoreInput<B>> for MultiLabelClassificationOutput<B>
Source§fn adapt(&self) -> HammingScoreInput<B>
fn adapt(&self) -> HammingScoreInput<B>
Adapt the type to be passed to a metric.
Auto Trait Implementations§
impl<B> Freeze for MultiLabelClassificationOutput<B>where
<B as BackendTypes>::IntTensorPrimitive: Freeze,
<B as BackendTypes>::FloatTensorPrimitive: Freeze,
<B as BackendTypes>::QuantizedTensorPrimitive: Freeze,
impl<B> RefUnwindSafe for MultiLabelClassificationOutput<B>where
<B as BackendTypes>::IntTensorPrimitive: RefUnwindSafe,
<B as BackendTypes>::FloatTensorPrimitive: RefUnwindSafe,
<B as BackendTypes>::QuantizedTensorPrimitive: RefUnwindSafe,
impl<B> Send for MultiLabelClassificationOutput<B>
impl<B> Sync for MultiLabelClassificationOutput<B>
impl<B> Unpin for MultiLabelClassificationOutput<B>where
<B as BackendTypes>::IntTensorPrimitive: Unpin,
<B as BackendTypes>::FloatTensorPrimitive: Unpin,
<B as BackendTypes>::QuantizedTensorPrimitive: Unpin,
impl<B> UnsafeUnpin for MultiLabelClassificationOutput<B>where
<B as BackendTypes>::IntTensorPrimitive: UnsafeUnpin,
<B as BackendTypes>::FloatTensorPrimitive: UnsafeUnpin,
<B as BackendTypes>::QuantizedTensorPrimitive: UnsafeUnpin,
impl<B> UnwindSafe for MultiLabelClassificationOutput<B>where
<B as BackendTypes>::IntTensorPrimitive: UnwindSafe,
<B as BackendTypes>::FloatTensorPrimitive: UnwindSafe,
<B as BackendTypes>::QuantizedTensorPrimitive: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more