Realm

oa::data::HostTensorDataset

Dense labeled feature/label pair implementing HostDataset. x is a rank-≥1 [N, ...] host tensor and y a [N] label vector with the same leading count and dtype class as collate_host accepts. get_host_sample slices along the leading axis.

StRust public API

Declaration

pub struct HostTensorDataset { /* private fields */ }
Public Rust declaration.

Public Methods

fn len(&self) -> i64
fn get_host_sample(&self, index: i64) -> Result<HostSample>
fn is_empty(&self) -> bool

Associated Functions

pub fn new(x: HostTensor, y: HostTensor) -> Result<Self>
pub fn from_f32_matrices(x: &Matrix, y: &Matrix) -> Result<Self>

Public Method Documentation

fn len( &self ) -> i64
No public source comment is attached to this declaration.
fn get_host_sample( &self, index: i64 ) -> Result<HostSample>
No public source comment is attached to this declaration.
fn is_empty( &self ) -> bool
No public source comment is attached to this declaration.
pub fn new( x: HostTensor, y: HostTensor ) -> Result<Self>
No public source comment is attached to this declaration.
pub fn from_f32_matrices( x: &Matrix, y: &Matrix ) -> Result<Self>
No public source comment is attached to this declaration.