import torch


def pretty_size(size):
	"""
	Pretty prints a torch.Size object

	By user machinethink: https://forums.fast.ai/t/gpu-memory-not-being-freed-after-training-is-over/10265/7

	"""
	assert(isinstance(size, torch.Size))
	return " × ".join(map(str, size))