Struct klib::ml::base::TrainConfig

source ·
pub struct TrainConfig {
Show 20 fields pub source: 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 mha_heads: usize, pub mha_dropout: f64, 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: f64, pub adam_beta1: f32, pub adam_beta2: f32, pub adam_epsilon: f32, pub sigmoid_strength: f32, pub no_plots: bool,
}
Expand description

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

Fields§

§source: String

The source directory for the gathered samples.

§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.

§mha_heads: usize

The number of Multi Head Attention (MHA) heads.

§mha_dropout: f64

The Multi Head Attention (MHA) dropout rate.

§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: f64

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.`

§sigmoid_strength: f32

The “sigmoid strength” of the final pass.

§no_plots: bool

Suppresses the training plots.

Implementations§

source§

impl TrainConfig

source

pub fn new( source: String, destination: String, log: String, simulation_size: usize, simulation_peak_radius: f32, simulation_harmonic_decay: f32, simulation_frequency_wobble: f32, mha_heads: usize, mha_dropout: f64, model_epochs: usize, model_batch_size: usize, model_workers: usize, model_seed: u64, adam_learning_rate: f64, adam_weight_decay: f64, adam_beta1: f32, adam_beta2: f32, adam_epsilon: f32, sigmoid_strength: 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 copy of the value. Read more
1.0.0 · source§

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

Performs copy-assignment from source. Read more
source§

impl Config for TrainConfig

§

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> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<S> FromSample<S> for S

§

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.

§

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

§

fn into_sample(self) -> T

§

impl<T> Pointable for T

§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

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

§

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
§

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

§

fn to_sample_(self) -> U

source§

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

source§

default 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>,

§

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>,

§

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.
§

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

§

fn vzip(self) -> V

source§

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

§

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