diffusion_models.utils.schemas ============================== .. py:module:: diffusion_models.utils.schemas Module Contents --------------- .. py:class:: TrainingConfiguration .. py:attribute:: training_name :type: str .. py:attribute:: batch_size :type: int .. py:attribute:: learning_rate :type: float .. py:attribute:: number_of_epochs :type: int .. py:attribute:: log_rate :type: int :value: 10 .. py:attribute:: image_rate :type: int :value: 100 .. py:attribute:: checkpoint_rate :type: int :value: 100 .. py:attribute:: mixed_precision_training :type: bool :value: False .. py:attribute:: gradient_clip :type: Optional[float] :value: None .. py:class:: LogConfiguration .. py:attribute:: log_rate :type: int :value: 10 .. py:attribute:: image_rate :type: int :value: 50 .. py:attribute:: number_of_images :type: int :value: 5 .. py:class:: BetaSchedulerConfiguration .. py:attribute:: steps :type: int .. py:attribute:: betas :type: torch.Tensor .. py:attribute:: alpha_bars :type: torch.Tensor .. py:class:: Checkpoint .. py:attribute:: epoch :type: int .. py:attribute:: model_state_dict :type: Dict[str, Any] .. py:attribute:: optimizer_state_dict :type: Dict[str, Any] .. py:attribute:: scaler :type: Optional[torch.cuda.amp.GradScaler] .. py:attribute:: beta_scheduler_config :type: BetaSchedulerConfiguration .. py:attribute:: tensorboard_run_name :type: Optional[str] :value: None .. py:attribute:: image_channels :type: int :value: 3 .. py:attribute:: loss :type: Optional[float] :value: None .. py:method:: from_file(file_path) :classmethod: .. py:method:: to_file(file_path) .. py:class:: OldCheckpoint .. py:attribute:: epoch :type: int .. py:attribute:: model_state_dict :type: Dict[str, Any] .. py:attribute:: optimizer_state_dict :type: Dict[str, Any] .. py:attribute:: scaler :type: Optional[torch.cuda.amp.GradScaler] .. py:attribute:: tensorboard_run_name :type: Optional[str] :value: None .. py:attribute:: loss :type: Optional[float] :value: None .. py:method:: from_file(file_path) :classmethod: .. py:method:: to_file(file_path) .. py:method:: to_new_checkpoint(beta_scheduler)