I suppose you could force the tensors to be on your gpu (cuda) and then inspect the memory usage as mentioned in a later answer by @albanD in  this section 114.
worked for me! (could confirm that although torch.repeat will allocate new memory, torch.expand won’t)