There is a list of PyTorch's Tensors and I want to convert it to array but it raised with error:
'list' object has no attribute 'cpu'
How can I convert it to array?
import torch
result = []
for i in range(3):
x = torch.randn((3, 4, 5))
result.append(x)
a = result.cpu().detach().numpy()