[Pytorch] torch.Tensor 와 torch.tensor 의 차이


[Pytorch] torch.Tensor 와 torch.tensor 의 차이

안녕하세요.이번 포스팅에서 소개해드릴 내용은 torch.Tensor와 torch.tensor에 관련한 내용입니다. torch.Tensor() will convert your data type to Float (torch.float32). Actually, torch.Tensor and torch.FloatTensor both do same thing.torch.tensor() will convert your data to tensor but you can select data type which is crucial in some methods. 기초 중의 기초이지만 헷갈리기도 하고 둘 다 코드 짜고 실행하는 데는 문제는 없는데 왜 따로 있을까?하는 찜찜함이 드는 부분입니다. torch.Tensor()는 dtype을 torch.float32로 출력하고, torch.tensor()는 입력된 data의 type을 따르거나 사용자가 지정할 수 있습니다. ..........



원문링크 : [Pytorch] torch.Tensor 와 torch.tensor 의 차이