torch.matmul() 에 대해서 이해해보자.
motivation: torch.matmul() 에 대해서 이해해보자. 입력 tensor가 3차원인 경우 –> torch.matmul(A,B) 는, A가 (b, n, m) 차원을 가지고, B가 (b, m, p)의 차원을 가지면, 결과는 (b,n,p) ...
motivation: torch.matmul() 에 대해서 이해해보자. 입력 tensor가 3차원인 경우 –> torch.matmul(A,B) 는, A가 (b, n, m) 차원을 가지고, B가 (b, m, p)의 차원을 가지면, 결과는 (b,n,p) ...
motivation: torch.contiguous(), is_contiguous(), view(), reshape() 를 알아보자. Pytorch에서 tensor의 내용을 바꾸지 않고, data가 어떻게 보이는지만 바꿔서 표현하는 함수들이 있다. 그 함수들에는 narro...
motivation: (torch.tensor).transpose() method에 대해서 이해해보자. 예를 들어서, tensor1 = torch.rand(3,4) tensor2 = torch.rand(3,4) 이런 tensor 2개가 있다고 하자. torch.ma...
motivation: sliding window attention, KV-cache에 대해서 알아보자. sliding window의 크기를 3이라고 하자. embedding vector의 차원을 4096 이라고 하고, dim = d_model= 4096 attenti...
motivation: normalization의 모든 종류들을 알아보자. batch normalization은 gradient vanishing 문제를 해결하기 위해서, 평균과 분산을 NN이 정하도록 설정하는 것이다. 그래서 ReLU는 gradient vanishin...