ERROR

[ML] ValueError: only one element tensors can be converted to Python scalars

파송송 2023. 1. 10. 21:57
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