MCPcopy Create free account
hub / github.com/Yasoz/DiffTraj / extract

Function extract

utils/helper.py:8–12  ·  view source on GitHub ↗
(input, t, x)

Source from the content-addressed store, hash-verified

6 return x[:, [0, 2]] / 10.0
7
8def 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
14def make_beta_schedule(schedule='linear', n_timesteps=1000, start=1e-5, end=1e-2):
15 if schedule == 'linear':

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected