pub struct UniqueOutput {
pub values: Tensor<f32>,
pub inverse: Option<Tensor<i32>>,
pub counts: Option<Tensor<i32>>,
}Expand description
unique_with_options/unique_consecutive の戻り値。要求
されなかった出力(return_inverse/return_counts が false)は
None。非微分・detached(Var::unique と同型の理由。モジュール
doc 参照)。
Fields§
§values: Tensor<f32>一意値集合(sorted=True)。
inverse: Option<Tensor<i32>>各入力要素(dim 指定時は各スライス)が属する values の
添字(return_inverse=true のときのみ Some)。
counts: Option<Tensor<i32>>values の各要素(スライス)の出現回数
(return_counts=true のときのみ Some)。
Trait Implementations§
Source§impl Clone for UniqueOutput
impl Clone for UniqueOutput
Source§fn clone(&self) -> UniqueOutput
fn clone(&self) -> UniqueOutput
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 UniqueOutput
impl RefUnwindSafe for UniqueOutput
impl Send for UniqueOutput
impl Sync for UniqueOutput
impl Unpin for UniqueOutput
impl UnsafeUnpin for UniqueOutput
impl UnwindSafe for UniqueOutput
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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