only one element tensors can be converted to Python scalars
只有一个元素张量可以转换为python标量
#list=[[],[]]
#cpu上
A = torch.tensor([item.detach().numpy() for item in A])
#GPU上
A = torch.tensor([item.cpu().detach().numpy() for item in A])
only one element tensors can be converted to Python scalars
只有一个元素张量可以转换为python标量
#list=[[],[]]
#cpu上
A = torch.tensor([item.detach().numpy() for item in A])
#GPU上
A = torch.tensor([item.cpu().detach().numpy() for item in A])