torch.empty — PyTorch 1.10.1 documentation
pytorch.org › docs › stabletorch.empty. torch.empty(*size, *, out=None, dtype=None, layout=torch.strided, device=None, requires_grad=False, pin_memory=False, memory_format=torch.contiguous_format) → Tensor. Returns a tensor filled with uninitialized data. The shape of the tensor is defined by the variable argument size. Parameters.
torch.cuda.empty_cache — PyTorch 1.10.1 documentation
pytorch.org › torchtorch.cuda.empty_cache() [source] Releases all unoccupied cached memory currently held by the caching allocator so that those can be used in other GPU application and visible in nvidia-smi. Note. empty_cache () doesn’t increase the amount of GPU memory available for PyTorch. However, it may help reduce fragmentation of GPU memory in certain ...