pub struct TensorDataset<T>where
T: Element,{ /* private fields */ }Expand description
tensor(先頭軸=サンプル軸)1 本からなるデータセット(PyTorch
torch.utils.data.TensorDataset の単一テンソル版)。
Implementations§
Source§impl<T> TensorDataset<T>where
T: Element,
impl<T> TensorDataset<T>where
T: Element,
Sourcepub fn new(tensor: Tensor<T>) -> Result<TensorDataset<T>, DataError>
pub fn new(tensor: Tensor<T>) -> Result<TensorDataset<T>, DataError>
tensor の先頭軸をサンプル軸とみなして構築する。tensor が
rank 0(スカラー。サンプル軸を持てない)のとき
DataError::ScalarTensor を返す。
Trait Implementations§
Auto Trait Implementations§
impl<T> Freeze for TensorDataset<T>
impl<T> RefUnwindSafe for TensorDataset<T>where
Tensor<T>: RefUnwindSafe,
impl<T> Send for TensorDataset<T>
impl<T> Sync for TensorDataset<T>
impl<T> Unpin for TensorDataset<T>
impl<T> UnsafeUnpin for TensorDataset<T>where
Tensor<T>: UnsafeUnpin,
impl<T> UnwindSafe for TensorDataset<T>where
Tensor<T>: 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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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