Struct burn_tensor::DataSerialize
source ยท 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ยงunsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
๐ฌThis is a nightly-only experimental API. (
clone_to_uninit
)