일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
Tags
- ros2 foxy tutorial
- nav2 dev contatiner
- humble 환경설정
- first-time robot setup guide
- nav2 development guides
- Python
- ros2 foxy docker
- error
- ros2 환경설정
- docker foxy
- ros2 튜토리얼
- Nav2 document
- nav2 설치
- 코드업
- CODEUP 6073
- nav2 tutorial
- ros2 configuring environment
- nav2 first-time robot setup guide
- foxy nav2
- setting up transformations
- ros2 development guides
- ros2 remapping
- ros2 튜토리얼 환경설정
- ros2 transformations 개념
- nav2 getting started
- humble development guides
- Foxy tutorial
- ROS FOXY 튜토리얼
- CodeUp
- nav2 튜토리얼
Archives
- Today
- Total
BAN2ARU
[Python/ Pytorch] torch.nn.ModuleList() 본문
반응형
https://pytorch.org/docs/stable/generated/torch.nn.ModuleList.html를 기반으로 작성하였음
CLASS
torch.nn.ModuleList(modules=None)
Submodule(conv,batchnorm 등 layer)을 list속에 담을 수 있음. 일반적인 python의 list와 유사하지만, torch.nn.module에서 확인 할 수 있음. Nerual network를 학습을 하기 위해서는 module list로 선언해주어야함. (일반 list로 구성시에는 torch.nn.module 메서드에서 확인이 불가능하므로, 학습이 되지 않음 - [1] 참조)
Parameters
- modules (iterable, optional) : 추가할 모듈의 iterable (iterable : 하나씩 차례대로 member들을 retrun할 수 있는 object : list, str, tuple 등 - [2] 참조)
Etc
append(module)
list의 끝에 주어진 module을 apped함.
<Parameters>
- module (nn.Module) - append할 모듈
extend(modules)
Python iterable의 모듈을 목록 끝에 추가함. ([3] 참조)
<Parameters>
- modules (iterable) - append할 모듈의 iterable
insert (index, module)
list에서 주어진 index 앞에 주어진 module을 insert함. ([3] 참조)
<Parameters>
- index (int) - insert할 index
- module (nn.Module) - insert할 module
Reference
[0] https://pytorch.org/docs/stable/generated/torch.nn.ModuleList.html
[1] https://hongl.tistory.com/279
728x90
'Language > Python' 카테고리의 다른 글
[Python] append(), extend(), insert() 비교 (0) | 2022.04.22 |
---|---|
[Python / Pytorch] torch.nn.ReLU() (0) | 2022.04.21 |
[Python/ Pytorch] torch.nn.BatchNorm2d() (0) | 2022.04.21 |
[Python/pytorch] torch.nn.Conv2d() (0) | 2022.04.21 |
cuda(async=True)에서 async가 SyntaxError: invalid syntax 오류 (0) | 2022.04.21 |