Skip to main content

TrainConfig

Struct TrainConfig 

Source
pub struct TrainConfig {
Show 23 fields pub noise_asset_root: String, pub training_sources: Vec<String>, pub validation_sources: Vec<String>, pub destination: String, pub log: String, pub simulation_size: usize, pub simulation_peak_radius: f32, pub simulation_harmonic_decay: f32, pub simulation_frequency_wobble: f32, pub captured_oversample_factor: usize, pub mha_heads: usize, pub dropout: f64, pub trunk_hidden_size: usize, pub model_epochs: usize, pub model_batch_size: usize, pub model_workers: usize, pub model_seed: u64, pub adam_learning_rate: f64, pub adam_weight_decay: f32, pub adam_beta1: f32, pub adam_beta2: f32, pub adam_epsilon: f32, pub no_plots: bool,
}
Expand description

The training configuration used for all training, inference, and hyper parameter tuning.

Fields§

§noise_asset_root: String

The source directory for the noise assets used to generate simulated items.

§training_sources: Vec<String>

The directories (or the special sim source) that provide training samples. Must contain at least one entry.

§validation_sources: Vec<String>

Optional directories (or sim) that provide validation samples. An empty list triggers an 80/20 split of the training pool.

§destination: String

The destination directory for the trained model.

§log: String

The log directory for training.

§simulation_size: usize

Simulation data set size.

§simulation_peak_radius: f32

Simulation peak radius.

§simulation_harmonic_decay: f32

Simulation harmonic decay.

§simulation_frequency_wobble: f32

Simulation frequency wobble.

§captured_oversample_factor: usize

The number of times to replicate captured samples when constructing datasets.

§mha_heads: usize

The number of Multi Head Attention (MHA) heads.

§dropout: f64

The dropout rate applied to attention and trunk layers.

§trunk_hidden_size: usize

The hidden size of the model’s MLP trunk.

§model_epochs: usize

The number of epochs to train for.

§model_batch_size: usize

The number of samples to use per epoch.

§model_workers: usize

The number of workers to use for training.

§model_seed: u64

The seed used for training.

§adam_learning_rate: f64

The Adam optimizer learning rate.

§adam_weight_decay: f32

The Adam optimizer weight decay.

§adam_beta1: f32

The Adam optimizer beta1.

§adam_beta2: f32

The Adam optimizer beta2.

§adam_epsilon: f32

The Adam optimizer epsilon.

§no_plots: bool

Suppresses the training plots.

Implementations§

Source§

impl TrainConfig

Source

pub fn new( noise_asset_root: String, training_sources: Vec<String>, validation_sources: Vec<String>, destination: String, log: String, simulation_size: usize, simulation_peak_radius: f32, simulation_harmonic_decay: f32, simulation_frequency_wobble: f32, captured_oversample_factor: usize, mha_heads: usize, dropout: f64, trunk_hidden_size: usize, model_epochs: usize, model_batch_size: usize, model_workers: usize, model_seed: u64, adam_learning_rate: f64, adam_weight_decay: f32, adam_beta1: f32, adam_beta2: f32, adam_epsilon: f32, no_plots: bool, ) -> Self

Create a new instance of the config.

Trait Implementations§

Source§

impl Clone for TrainConfig

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Config for TrainConfig

Source§

fn load_binary(data: &[u8]) -> Result<Self, ConfigError>

Loads the configuration from a binary buffer. Read more
Source§

impl Debug for TrainConfig

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for TrainConfig

Source§

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 Display for TrainConfig

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Serialize for TrainConfig

Source§

fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
where S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<S, T> Duplex<S> for T
where T: FromSample<S> + ToSample<S>,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<S> FromSample<S> for S

Source§

fn from_sample_(s: S) -> S

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<F, T> IntoSample<T> for F
where T: FromSample<F>,

Source§

fn into_sample(self) -> T

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> ToSample<U> for T
where U: FromSample<T>,

Source§

fn to_sample_(self) -> U

Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V