Representation Learning With Diffusion Models