728x90
torch.Tensor(X)
ValueError: only one element tensors can be converted to Python scalars
torch.Tensor(X) 대신 torch.stack(X, dim=0)를 쓴다
X = torch.stack(X, dim=0)
728x90
torch.Tensor(X)
ValueError: only one element tensors can be converted to Python scalars
torch.Tensor(X) 대신 torch.stack(X, dim=0)를 쓴다
X = torch.stack(X, dim=0)