LightningODE_FixedPotential#
- class scdiffeq.core.lightning_models._lightning_ode_fixed_potential.LightningODE_FixedPotential(latent_dim: int = 50, name: str | None = None, dt: float = 0.1, mu_hidden: ~typing.List[int] | int = [400, 400], mu_activation: str | ~typing.List[str] = 'LeakyReLU', mu_dropout: float | ~typing.List[float] = 0.2, mu_bias: bool = True, mu_output_bias: bool = True, mu_n_augment: int = 0, train_lr=0.0001, train_optimizer=<class 'torch.optim.rmsprop.RMSprop'>, train_scheduler=<class 'torch.optim.lr_scheduler.StepLR'>, train_step_size: int = 10, backend: str = 'auto', adjoint=False, loading_existing: bool = False, *args, **kwargs)[source]#
Bases:
BaseForwardMixIn,PotentialMixIn,BaseLightningDiffEqLightningODE-FixedPotential
Parameters:#
- latent_dimint, optional
Dimensionality of the latent space, by default 50
- namestr, optional
Name of the model, by default None
- dtfloat, optional
Time step for the ODE solver, by default 0.1
- mu_hiddenUnion[List[int], int], optional
Hidden layer sizes for the neural network, by default [400, 400]
- mu_activationUnion[str, List[str]], optional
Activation function(s) for the neural network, by default “LeakyReLU”
- mu_dropoutUnion[float, List[float]], optional
Dropout rate(s) for the neural network, by default 0.2
- mu_biasbool, optional
Whether to use bias in the neural network, by default True
- mu_output_biasbool, optional
Whether to use bias in the output layer of the neural network, by default True
- mu_n_augmentint, optional
Number of augmentations for the neural network, by default 0
- train_lrfloat, optional
Learning rate for training, by default 1e-4
- train_optimizertorch.optim.Optimizer, optional
Optimizer for training, by default torch.optim.RMSprop
- train_schedulertorch.optim.lr_scheduler._LRScheduler, optional
Learning rate scheduler for training, by default torch.optim.lr_scheduler.StepLR
- train_step_sizeint, optional
Step size for the learning rate scheduler, by default 10
- backendstr, optional
Backend for the ODE solver, by default “auto”
- adjointbool, optional
Whether to use the adjoint method for the ODE solver, by default False
- loading_existingbool, optional
Whether to load an existing model, by default False
Returns:#
None
Notes:#
This class implements a fixed potential ODE using PyTorch Lightning.
Examples:#
>>> model = LightningODE_FixedPotential(latent_dim=20, dt=0.05) >>> model.fit(data)
- __init__(latent_dim: int = 50, name: str | None = None, dt: float = 0.1, mu_hidden: ~typing.List[int] | int = [400, 400], mu_activation: str | ~typing.List[str] = 'LeakyReLU', mu_dropout: float | ~typing.List[float] = 0.2, mu_bias: bool = True, mu_output_bias: bool = True, mu_n_augment: int = 0, train_lr=0.0001, train_optimizer=<class 'torch.optim.rmsprop.RMSprop'>, train_scheduler=<class 'torch.optim.lr_scheduler.StepLR'>, train_step_size: int = 10, backend: str = 'auto', adjoint=False, loading_existing: bool = False, *args, **kwargs) None[source]#
LightningODE_FixedPotential
Parameters:#
- latent_dimint, optional
Dimensionality of the latent space, by default 50
- namestr, optional
Name of the model, by default None
- dtfloat, optional
Time step for the ODE solver, by default 0.1
- mu_hiddenUnion[List[int], int], optional
Hidden layer sizes for the neural network, by default [400, 400]
- mu_activationUnion[str, List[str]], optional
Activation function(s) for the neural network, by default “LeakyReLU”
- mu_dropoutUnion[float, List[float]], optional
Dropout rate(s) for the neural network, by default 0.2
- mu_biasbool, optional
Whether to use bias in the neural network, by default True
- mu_output_biasbool, optional
Whether to use bias in the output layer of the neural network, by default True
- mu_n_augmentint, optional
Number of augmentations for the neural network, by default 0
- train_lrfloat, optional
Learning rate for training, by default 1e-4
- train_optimizertorch.optim.Optimizer, optional
Optimizer for training, by default torch.optim.RMSprop
- train_schedulertorch.optim.lr_scheduler._LRScheduler, optional
Learning rate scheduler for training, by default torch.optim.lr_scheduler.StepLR
- train_step_sizeint, optional
Step size for the learning rate scheduler, by default 10
- backendstr, optional
Backend for the ODE solver, by default “auto”
- adjointbool, optional
Whether to use the adjoint method for the ODE solver, by default False
- loading_existingbool, optional
Whether to load an existing model, by default False
Returns:#
None
Notes:#
This class implements a fixed potential ODE using PyTorch Lightning.
Examples:#
>>> model = LightningODE_FixedPotential(latent_dim=20, dt=0.05) >>> model.fit(data)