pub struct CurriculumExample {
pub input: Tensor,
pub target: Tensor,
pub difficulty: f32,
pub metadata: HashMap<String, String>,
pub weight: f32,
}Expand description
Training example with difficulty score
Fields§
§input: TensorInput data
target: TensorTarget labels
difficulty: f32Difficulty score (0.0 = easiest, 1.0 = hardest)
metadata: HashMap<String, String>Optional metadata
weight: f32Example weight for training
Implementations§
Source§impl CurriculumExample
impl CurriculumExample
Sourcepub fn new(input: Tensor, target: Tensor, difficulty: f32) -> Self
pub fn new(input: Tensor, target: Tensor, difficulty: f32) -> Self
Create a new curriculum example
Sourcepub fn with_metadata(
input: Tensor,
target: Tensor,
difficulty: f32,
metadata: HashMap<String, String>,
) -> Self
pub fn with_metadata( input: Tensor, target: Tensor, difficulty: f32, metadata: HashMap<String, String>, ) -> Self
Create with metadata
Sourcepub fn with_weight(self, weight: f32) -> Self
pub fn with_weight(self, weight: f32) -> Self
Set example weight
Trait Implementations§
Source§impl Clone for CurriculumExample
impl Clone for CurriculumExample
Source§fn clone(&self) -> CurriculumExample
fn clone(&self) -> CurriculumExample
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for CurriculumExample
impl RefUnwindSafe for CurriculumExample
impl Send for CurriculumExample
impl Sync for CurriculumExample
impl Unpin for CurriculumExample
impl UnsafeUnpin for CurriculumExample
impl UnwindSafe for CurriculumExample
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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