I have a pytorch Tensor of size torch.Size([4, 3, 966, 1296])
pytorch
torch.Size([4, 3, 966, 1296])
I want to convert it to numpy array using the following code:
numpy
This worked for me:
np_arr = torch_tensor.cpu().detach().numpy()