style: apply rustfmt across all crates and demos
Consistent formatting pass: line wrapping, import sorting, trailing whitespace removal, let-chain indentation, merged derive attributes, and unsafe block reformatting. Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
This commit is contained in:
@@ -20,8 +20,7 @@ use crate::Result;
|
||||
use rtx_tensor::Tensor;
|
||||
|
||||
/// Reduction modes for loss computation
|
||||
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
|
||||
#[derive(Default)]
|
||||
#[derive(Debug, Clone, Copy, PartialEq, Eq, Default)]
|
||||
pub enum Reduction {
|
||||
/// No reduction - return per-sample losses
|
||||
None,
|
||||
@@ -32,7 +31,6 @@ pub enum Reduction {
|
||||
Sum,
|
||||
}
|
||||
|
||||
|
||||
/// Base trait for all loss functions
|
||||
pub trait Loss {
|
||||
/// Compute the forward pass of the loss
|
||||
|
||||
Reference in New Issue
Block a user