forceschedule
Force schedule functions for driven DDPM diffusion models.
This module defines the base abstract class for force schedules and two concrete implementations that map a normalized time variable \(t \in [0,1]\) to a force scaling coefficient \(\alpha_{\mathrm{force}}(t)\).
Classes:
-
ForceSchedule
–Abstract base class for force schedules.
-
LinearForceSchedule
–Fades in force linearly: \(\alpha_{\mathrm{force}}(t) = 1 - t\).
-
ConstantForceSchedule
–Constant force: \(\alpha_{\mathrm{force}}(t) = 1\).
ForceSchedule
¶
Bases: ABC
Abstract base class for force schedules.
Defines the interface for the time-dependent force scaling coefficient \(\alpha_{\mathrm{force}}(t)\) in driven DDPM models.
Methods:
-
alpha_force
–Compute force scaling at time \(t\).
alpha_force(t)
abstractmethod
¶
Compute the force scaling coefficient at time \(t\).
Parameters:
-
t
((array_like, shape(dim1))
) –Normalized time steps, where \(t \in [0, 1]\).
Returns:
-
alpha_t
((array_like, shape(dim1))
) –Force scaling coefficients.
Source code in src/fpsl/ddm/forceschedule.py
41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 |
|
LinearForceSchedule
¶
Bases: ForceSchedule
Linearly fading force schedule.
Implements:
Methods:
-
alpha_force
–Returns \(1 - t\) for each time \(t\).
alpha_force(t)
¶
Compute linearly fading force scaling.
Parameters:
-
t
((array_like, shape(dim1))
) –Normalized time steps.
Returns:
-
alpha_t
((array_like, shape(dim1))
) –Force scaling coefficients equal to \(1 - t\).
Source code in src/fpsl/ddm/forceschedule.py
78 79 80 81 82 83 84 85 86 87 88 89 90 91 |
|
ConstantForceSchedule
¶
Bases: ForceSchedule
Constant force schedule.
Implements:
Methods:
-
alpha_force
–Returns 1 for each time \(t\).
alpha_force(t)
¶
Compute constant force scaling.
Parameters:
-
t
((array_like, shape(dim1))
) –Normalized time steps.
Returns:
-
alpha_t
((array_like, shape(dim1))
) –Force scaling coefficients all equal to 1.
Source code in src/fpsl/ddm/forceschedule.py
114 115 116 117 118 119 120 121 122 123 124 125 126 127 |
|