pub struct DataSerialize<E> {
pub value: Vec<E>,
pub shape: Vec<usize>,
}๐Deprecated since 0.14.0: the internal data format has changed, please use
TensorData insteadExpand description
Data structure for serializing and deserializing tensor data.
Fieldsยง
ยงvalue: Vec<E>๐Deprecated since 0.14.0: the internal data format has changed, please use
TensorData insteadThe values of the tensor.
shape: Vec<usize>๐Deprecated since 0.14.0: the internal data format has changed, please use
TensorData insteadThe shape of the tensor.
Implementationsยง
Sourceยงimpl<E> DataSerialize<E>
impl<E> DataSerialize<E>
Sourceยงimpl<E: Element> DataSerialize<E>
impl<E: Element> DataSerialize<E>
Sourcepub fn convert<EOther: Element>(self) -> DataSerialize<EOther>
pub fn convert<EOther: Element>(self) -> DataSerialize<EOther>
Converts the data to a different element type.
Sourcepub fn into_tensor_data(self) -> TensorData
pub fn into_tensor_data(self) -> TensorData
Converts the data to the new TensorData format.
Trait Implementationsยง
Sourceยงimpl<E: Clone> Clone for DataSerialize<E>
impl<E: Clone> Clone for DataSerialize<E>
Sourceยงfn clone(&self) -> DataSerialize<E>
fn clone(&self) -> DataSerialize<E>
Returns a copy 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<E: Debug> Debug for DataSerialize<E>
impl<E: Debug> Debug for DataSerialize<E>
Sourceยงimpl<'de, E> Deserialize<'de> for DataSerialize<E>where
E: Deserialize<'de>,
impl<'de, E> Deserialize<'de> for DataSerialize<E>where
E: Deserialize<'de>,
Sourceยงfn 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
Sourceยงimpl<E: Clone, const D: usize> From<&DataSerialize<E>> for Data<E, D>
impl<E: Clone, const D: usize> From<&DataSerialize<E>> for Data<E, D>
Sourceยงfn from(data: &DataSerialize<E>) -> Self
fn from(data: &DataSerialize<E>) -> Self
Converts to this type from the input type.
Sourceยงimpl<E, const D: usize> From<DataSerialize<E>> for Data<E, D>
impl<E, const D: usize> From<DataSerialize<E>> for Data<E, D>
Sourceยงfn from(data: DataSerialize<E>) -> Self
fn from(data: DataSerialize<E>) -> Self
Converts to this type from the input type.
Sourceยงimpl<E: PartialEq> PartialEq for DataSerialize<E>
impl<E: PartialEq> PartialEq for DataSerialize<E>
Sourceยงimpl<E> Serialize for DataSerialize<E>where
E: Serialize,
impl<E> Serialize for DataSerialize<E>where
E: Serialize,
impl<E: Eq> Eq for DataSerialize<E>
impl<E> StructuralPartialEq for DataSerialize<E>
Auto Trait Implementationsยง
impl<E> Freeze for DataSerialize<E>
impl<E> RefUnwindSafe for DataSerialize<E>where
E: RefUnwindSafe,
impl<E> Send for DataSerialize<E>where
E: Send,
impl<E> Sync for DataSerialize<E>where
E: Sync,
impl<E> Unpin for DataSerialize<E>where
E: Unpin,
impl<E> UnwindSafe for DataSerialize<E>where
E: 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
Sourceยงimpl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Sourceยงimpl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Sourceยงfn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.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