pub struct ShapeVaeConfig {
pub d_model: usize,
pub latents: usize,
pub latent_dim: usize,
pub num_heads: usize,
pub head_dim: usize,
pub d_ff: usize,
pub encoder_blocks: usize,
pub frequencies: usize,
pub eps: f32,
pub free_bits: f32,
}Expand description
The shape of a ShapeVae.
The defaults are the plan’s: 2,048 surface points compressed into a
[512, 64] latent, which is 32,768 numbers for a whole shape.
Fields§
§d_model: usize§latents: usizeHow many latent vectors the shape is compressed into.
latent_dim: usizeThe width of one latent vector, which is much narrower than d_model.
num_heads: usize§head_dim: usize§d_ff: usize§encoder_blocks: usizeSelf-attention blocks over the latents, after the surface is read.
frequencies: usizeOctaves of fourier_features. The highest frequency is 2^(n-1)
cycles per unit, so this is the cap on the detail the field can hold.
eps: f32§free_bits: f32The per-unit KL floor a training loop hands to
crate::losses::kl_divergence_free_bits, in nats. Zero is the plain
divergence.
The model itself never reads this. It lives on the config because the config is what a checkpoint carries and what a resume compares, so a run cannot silently continue under a different floor than it started with. Old checkpoints, written before the field existed, load as zero and so keep the behaviour they were trained with.
Implementations§
Source§impl ShapeVaeConfig
impl ShapeVaeConfig
Sourcepub fn feature_dim(&self) -> usize
pub fn feature_dim(&self) -> usize
The width of one Fourier-encoded point: the raw coordinates, then a sine and a cosine per axis per octave.
Trait Implementations§
Source§impl Clone for ShapeVaeConfig
impl Clone for ShapeVaeConfig
impl Copy for ShapeVaeConfig
Source§impl Debug for ShapeVaeConfig
impl Debug for ShapeVaeConfig
Source§impl Default for ShapeVaeConfig
impl Default for ShapeVaeConfig
Source§impl<'de> Deserialize<'de> for ShapeVaeConfig
impl<'de> Deserialize<'de> for ShapeVaeConfig
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>,
Source§impl PartialEq for ShapeVaeConfig
impl PartialEq for ShapeVaeConfig
Source§impl Serialize for ShapeVaeConfig
impl Serialize for ShapeVaeConfig
impl StructuralPartialEq for ShapeVaeConfig
Auto Trait Implementations§
impl Freeze for ShapeVaeConfig
impl RefUnwindSafe for ShapeVaeConfig
impl Send for ShapeVaeConfig
impl Sync for ShapeVaeConfig
impl Unpin for ShapeVaeConfig
impl UnsafeUnpin for ShapeVaeConfig
impl UnwindSafe for ShapeVaeConfig
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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> ⓘ
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> ⓘ
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