Struct tch_serde::TensorRepr
source · [−]pub struct TensorRepr {
pub requires_grad: bool,
pub device: Device,
pub shape: Vec<i64>,
pub kind: Kind,
pub data: Vec<u8>,
}
Expand description
Fields
requires_grad: bool
device: Device
shape: Vec<i64>
kind: Kind
data: Vec<u8>
Trait Implementations
sourceimpl Clone for TensorRepr
impl Clone for TensorRepr
sourcefn clone(&self) -> TensorRepr
fn clone(&self) -> TensorRepr
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for TensorRepr
impl Debug for TensorRepr
sourceimpl<'de> Deserialize<'de> for TensorRepr
impl<'de> Deserialize<'de> for TensorRepr
sourcefn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl PartialEq<TensorRepr> for TensorRepr
impl PartialEq<TensorRepr> for TensorRepr
sourcefn eq(&self, other: &TensorRepr) -> bool
fn eq(&self, other: &TensorRepr) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &TensorRepr) -> bool
fn ne(&self, other: &TensorRepr) -> bool
This method tests for !=
.
sourceimpl Serialize for TensorRepr
impl Serialize for TensorRepr
impl Eq for TensorRepr
impl StructuralEq for TensorRepr
impl StructuralPartialEq for TensorRepr
Auto Trait Implementations
impl RefUnwindSafe for TensorRepr
impl Send for TensorRepr
impl Sync for TensorRepr
impl Unpin for TensorRepr
impl UnwindSafe for TensorRepr
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more