Wrapper function: transfrom score prediction model to velocity Args: score: [batch_dim, ...] shaped tensor; score model output x: [batch_dim, ...] shaped tensor; x_t data point t: [batch_dim,] time tensor
(self, score, x, t)
| 149 | return noise |
| 150 | |
| 151 | def get_velocity_from_score(self, score, x, t): |
| 152 | """Wrapper function: transfrom score prediction model to velocity |
| 153 | Args: |
| 154 | score: [batch_dim, ...] shaped tensor; score model output |
| 155 | x: [batch_dim, ...] shaped tensor; x_t data point |
| 156 | t: [batch_dim,] time tensor |
| 157 | """ |
| 158 | t = pad_v_like_x(t, x) |
| 159 | drift, var = self.compute_drift(x, t) |
| 160 | velocity = var * score - drift |
| 161 | return velocity |
| 162 | |
| 163 | |
| 164 | class GVPSchedule(LinearSchedule): |
nothing calls this directly
no test coverage detected