Repeat (1) 썸네일형 리스트형 [Pytorch] torch.Tensor.expand() & torch.Tensor.repeat() torch 사용 중에 expand와 repeat을 몇번 접하게 되었는데, 사용하게 되면 어떤 결과가 나오는지에 대한 naive한 느낌은 있지만 명확하게 기억나지 않을때가 있어서 정리해놓으려고 한다. torch.Tensor.expand()https://pytorch.org/docs/stable/generated/torch.Tensor.expand.html#torch.Tensor.expand torch.Tensor.expand — PyTorch 2.4 documentationShortcutspytorch.orgPytorch 공식문서에 따르면, expand 메소드는 '차원 수가 1인 dim에 대해 그 수를 늘려준 view를 반환한다' 라고 설명되어있다.import torchtensor = torch.tenso.. 이전 1 다음