(a, t, x_shape)
| 54 | |
| 55 | |
| 56 | def extract_into_tensor(a, t, x_shape): |
| 57 | b, *_ = t.shape |
| 58 | out = a.gather(-1, t) |
| 59 | return out.reshape(b, *((1,) * (len(x_shape) - 1))) |
| 60 | |
| 61 | def extract_and_interpolate_into_tensor(a, t, x_shape): |
| 62 | b, *_ = t.shape |
no outgoing calls
no test coverage detected