pub struct VqCodebookRecordItem<B: Backend, S: PrecisionSettings> {
pub embedding_sum: <<Param<Tensor<B, 2>> as Module<B>>::Record as Record<B>>::Item<S>,
pub cluster_usage: <<Param<Tensor<B, 1>> as Module<B>>::Record as Record<B>>::Item<S>,
pub cpu_normalized: <<Vec<f32> as Module<B>>::Record as Record<B>>::Item<S>,
pub embed_dim: <<usize as Module<B>>::Record as Record<B>>::Item<S>,
}Expand description
The record item type for the module.
Fields§
§embedding_sum: <<Param<Tensor<B, 2>> as Module<B>>::Record as Record<B>>::Item<S>Field to be serialized.
cluster_usage: <<Param<Tensor<B, 1>> as Module<B>>::Record as Record<B>>::Item<S>Field to be serialized.
cpu_normalized: <<Vec<f32> as Module<B>>::Record as Record<B>>::Item<S>Field to be serialized.
embed_dim: <<usize as Module<B>>::Record as Record<B>>::Item<S>Field to be serialized.
Trait Implementations§
Source§impl<B: Backend, S: PrecisionSettings> Clone for VqCodebookRecordItem<B, S>
impl<B: Backend, S: PrecisionSettings> Clone for VqCodebookRecordItem<B, S>
Source§impl<'de, B: Backend, S: PrecisionSettings> Deserialize<'de> for VqCodebookRecordItem<B, S>where
<<Param<Tensor<B, 2>> as Module<B>>::Record as Record<B>>::Item<S>: Serialize + DeserializeOwned,
<<Param<Tensor<B, 1>> as Module<B>>::Record as Record<B>>::Item<S>: Serialize + DeserializeOwned,
<<Vec<f32> as Module<B>>::Record as Record<B>>::Item<S>: Serialize + DeserializeOwned,
<<usize as Module<B>>::Record as Record<B>>::Item<S>: Serialize + DeserializeOwned,
impl<'de, B: Backend, S: PrecisionSettings> Deserialize<'de> for VqCodebookRecordItem<B, S>where
<<Param<Tensor<B, 2>> as Module<B>>::Record as Record<B>>::Item<S>: Serialize + DeserializeOwned,
<<Param<Tensor<B, 1>> as Module<B>>::Record as Record<B>>::Item<S>: Serialize + DeserializeOwned,
<<Vec<f32> as Module<B>>::Record as Record<B>>::Item<S>: Serialize + DeserializeOwned,
<<usize as Module<B>>::Record as Record<B>>::Item<S>: Serialize + DeserializeOwned,
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<B: Backend, S: PrecisionSettings> Serialize for VqCodebookRecordItem<B, S>where
<<Param<Tensor<B, 2>> as Module<B>>::Record as Record<B>>::Item<S>: Serialize + DeserializeOwned,
<<Param<Tensor<B, 1>> as Module<B>>::Record as Record<B>>::Item<S>: Serialize + DeserializeOwned,
<<Vec<f32> as Module<B>>::Record as Record<B>>::Item<S>: Serialize + DeserializeOwned,
<<usize as Module<B>>::Record as Record<B>>::Item<S>: Serialize + DeserializeOwned,
impl<B: Backend, S: PrecisionSettings> Serialize for VqCodebookRecordItem<B, S>where
<<Param<Tensor<B, 2>> as Module<B>>::Record as Record<B>>::Item<S>: Serialize + DeserializeOwned,
<<Param<Tensor<B, 1>> as Module<B>>::Record as Record<B>>::Item<S>: Serialize + DeserializeOwned,
<<Vec<f32> as Module<B>>::Record as Record<B>>::Item<S>: Serialize + DeserializeOwned,
<<usize as Module<B>>::Record as Record<B>>::Item<S>: Serialize + DeserializeOwned,
Auto Trait Implementations§
impl<B, S> !RefUnwindSafe for VqCodebookRecordItem<B, S>
impl<B, S> !UnwindSafe for VqCodebookRecordItem<B, S>
impl<B, S> Freeze for VqCodebookRecordItem<B, S>
impl<B, S> Send for VqCodebookRecordItem<B, S>
impl<B, S> Sync for VqCodebookRecordItem<B, S>
impl<B, S> Unpin for VqCodebookRecordItem<B, S>
impl<B, S> UnsafeUnpin for VqCodebookRecordItem<B, S>where
<<Param<Tensor<B, 2>> as Module<B>>::Record as Record<B>>::Item<S>: UnsafeUnpin,
<<Param<Tensor<B, 1>> as Module<B>>::Record as Record<B>>::Item<S>: UnsafeUnpin,
<<Vec<f32> as Module<B>>::Record as Record<B>>::Item<S>: UnsafeUnpin,
<<usize as Module<B>>::Record as Record<B>>::Item<S>: UnsafeUnpin,
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