Utility functions for DDPM experiemnt

10import torch.utils.data

Gather consts for and reshape to feature map shape

13def gather(consts: torch.Tensor, t: torch.Tensor):
15    c = consts.gather(-1, t)
16    return c.reshape(-1, 1, 1, 1)