my code is :
import torch
import numpy as np
a_2GB = np.ones((214, 214))
a_2GB_torch = torch.from_numpy(a_2GB)
a_2GB_torch_gpu = a_2GB_torch.cuda()
a_2GB_torch_gpu = a_2GB_torch_gpu.cpu()
torch.cuda.empty_cache()
but i am getting error :
AttributeError: module ‘torch.cuda’ has no attribute ‘empty_cache’