| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 1 | 2 | 3 | 4 | 5 | 6 | |
| 7 | 8 | 9 | 10 | 11 | 12 | 13 |
| 14 | 15 | 16 | 17 | 18 | 19 | 20 |
| 21 | 22 | 23 | 24 | 25 | 26 | 27 |
| 28 | 29 | 30 | 31 |
- 자료구조
- PRML
- Meta Learning
- pytorch
- Python
- algorithm
- REACT
- SSL
- nerf
- Torch
- 머신러닝
- CV
- math
- 딥러닝
- nlp
- Front
- 3d
- web
- FineGrained
- classification
- computervision
- Depth estimation
- 알고리즘
- Vision
- cs
- ML
- rl
- clean code
- FGVC
- dl
- Today
- Total
목록Python/Pytorch (10)
KalelPark's LAB
Chunk - Tensor를 지정된 Chunk의 개수로 분할하려고 합니다. 각 Chunk는 입력 텐서의 View이다. - torch.tensor_split()은 항상 명확하게, Chunk하지만, torch.Chunk는 작거나, 같게 합니다. (유연성) import torch chunk_example = torch.arange(12) print(chunk_example) -> tensor([ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]) print(chunk_example.size()) -> torch.Size([12]) print(chunk_example.chunk(6, dim = -1)) -> (tensor([0, 1]), tensor([2, 3]), tensor([4, 5]),..
torch.nn.Module.register_buffer - parameter가 아니라 buffer를 수행하기 위한 목적으로 활용됩니다. - buffer는 state_dict에 저장되지만, 최적화에 사용되지 않습니다. 즉, 단순한 module이라고 볼 수 있습니다. def register_module(self, name : str, module : Optional["Module"]) -> None: self.add_module(name, module) torch.nn.Module.register_parameter - module에 name을 기반으로 parameter를 추가합니다. - register_buffer와 다르게, 최적화에 사용될 수 있습니다. def register_parameter(self,..