| 41 | |
| 42 | |
| 43 | class Constant(DecayScheduler): |
| 44 | |
| 45 | def call(self, step: Tensor) -> Tensor: |
| 46 | # TODO should be an in-place operator |
| 47 | ret = Tensor((1,), step.device) |
| 48 | ret.set_value(self.init_value) |
| 49 | return ret |
| 50 | |
| 51 | |
| 52 | class ExponentialDecay(DecayScheduler): |