(input, t, x)
| 6 | return x[:, [0, 2]] / 10.0 |
| 7 | |
| 8 | def extract(input, t, x): |
| 9 | shape = x.shape |
| 10 | out = torch.gather(input, 0, t.to(input.device)) |
| 11 | reshape = [t.shape[0]] + [1] * (len(shape) - 1) |
| 12 | return out.reshape(*reshape) |
| 13 | |
| 14 | def make_beta_schedule(schedule='linear', n_timesteps=1000, start=1e-5, end=1e-2): |
| 15 | if schedule == 'linear': |
nothing calls this directly
no outgoing calls
no test coverage detected