pub struct Training {
pub pretrained_model: String,
pub optimizer: Optimizer,
pub learning_rate: LearningRate,
}Expand description
The training configuration for the training process.
Fields§
§pretrained_model: StringThe name or path of the pretrained model to use for the training process.
optimizer: OptimizerThe optimizer to use for the training process.
learning_rate: LearningRateThe learning rate to use for the training process.
Implementations§
Source§impl Training
impl Training
Sourcepub fn with_pretrained_model(self, pretrained_model: impl Into<String>) -> Self
pub fn with_pretrained_model(self, pretrained_model: impl Into<String>) -> Self
Set the pretrained model for the training process.
Sourcepub fn with_optimizer(self, optimizer: Optimizer) -> Self
pub fn with_optimizer(self, optimizer: Optimizer) -> Self
Set the optimizer for the training process.
Sourcepub fn with_learning_rate(self, learning_rate: LearningRate) -> Self
pub fn with_learning_rate(self, learning_rate: LearningRate) -> Self
Set the learning rate for the training process.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Training
impl<'de> Deserialize<'de> for Training
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
Auto Trait Implementations§
impl Freeze for Training
impl RefUnwindSafe for Training
impl Send for Training
impl Sync for Training
impl Unpin for Training
impl UnwindSafe for Training
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