(initial_value, final_value, total_steps, current_step)
| 547 | |
| 548 | |
| 549 | def linear_decay(initial_value, final_value, total_steps, current_step): |
| 550 | if current_step >= total_steps: |
| 551 | return final_value |
| 552 | current_step = max(0, current_step) |
| 553 | step_size = (final_value - initial_value) / total_steps |
| 554 | current_value = initial_value + step_size * current_step |
| 555 | return current_value |
| 556 | |
| 557 | |
| 558 | def traj_tensor_to_vae_latent(traj_tensor, vae, device): |
nothing calls this directly
no outgoing calls
no test coverage detected