pub struct SensorTextItem {
pub sensor: Vec<f32>,
pub token_ids: Vec<i32>,
pub attention_mask: Vec<i32>,
pub caption_text: String,
}Expand description
A single (sensor, caption) training pair.
Fields§
§sensor: Vec<f32>Normalised sensor values, flat f32 slice of length T × C
(row-major: index t * C + c).
token_ids: Vec<i32>Tokenised caption as a Vec<i32> (token IDs, padded to max_seq_len).
attention_mask: Vec<i32>Padding mask: 1 for real tokens, 0 for padding.
caption_text: StringRaw caption text (kept for debugging / evaluation).
Trait Implementations§
Source§impl<B: Backend> Batcher<SensorTextItem, SensorLMBatch<B>> for SensorLMBatcher<B>
impl<B: Backend> Batcher<SensorTextItem, SensorLMBatch<B>> for SensorLMBatcher<B>
Source§fn batch(&self, items: Vec<SensorTextItem>) -> SensorLMBatch<B>
fn batch(&self, items: Vec<SensorTextItem>) -> SensorLMBatch<B>
Batches the given items. Read more
Source§impl Clone for SensorTextItem
impl Clone for SensorTextItem
Source§fn clone(&self) -> SensorTextItem
fn clone(&self) -> SensorTextItem
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 moreSource§impl Dataset<SensorTextItem> for CsvSensorDataset
impl Dataset<SensorTextItem> for CsvSensorDataset
Source§fn iter(&self) -> DatasetIterator<'_, I>where
Self: Sized,
fn iter(&self) -> DatasetIterator<'_, I>where
Self: Sized,
Returns an iterator over the dataset.
Source§impl Dataset<SensorTextItem> for SyntheticSensorDataset
impl Dataset<SensorTextItem> for SyntheticSensorDataset
Source§fn iter(&self) -> DatasetIterator<'_, I>where
Self: Sized,
fn iter(&self) -> DatasetIterator<'_, I>where
Self: Sized,
Returns an iterator over the dataset.
Auto Trait Implementations§
impl Freeze for SensorTextItem
impl RefUnwindSafe for SensorTextItem
impl Send for SensorTextItem
impl Sync for SensorTextItem
impl Unpin for SensorTextItem
impl UnsafeUnpin for SensorTextItem
impl UnwindSafe for SensorTextItem
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