일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- humble development guides
- ros2 configuring environment
- ros2 환경설정
- ros2 transformations 개념
- nav2 getting started
- ROS FOXY 튜토리얼
- first-time robot setup guide
- nav2 tutorial
- foxy nav2
- ros2 remapping
- ros2 튜토리얼
- nav2 설치
- nav2 튜토리얼
- humble 환경설정
- ros2 development guides
- error
- ros2 foxy docker
- CodeUp
- Nav2 document
- Python
- nav2 dev contatiner
- Foxy tutorial
- setting up transformations
- nav2 development guides
- nav2 first-time robot setup guide
- CODEUP 6073
- docker foxy
- ros2 튜토리얼 환경설정
- ros2 foxy tutorial
- 코드업
- Today
- Total
목록Language/Python (20)
BAN2ARU
Python에서는 요소를 추가하는 함수로 append(), extend(), insert()가 있는데 각각 어떠한 차이가 있는지 알아보자. 간략하게, 한 줄로 각 함수를 설명하면 다음과 같다. append() list.append(x)로 활용하며, list의 끝에 x와 같은 요소를 더해준다. [기존의 list 마지막 위치에 다른 요소 추가] extend() list.extend(iterable)로 활용하며, list의 끝에 iterable의 요소들을 더해준다. [기존의 list에 다른 list 추가] insert() list.extend(i,x)로 활용하며, list의 인데스 i 위치에 x와 같은 요소를 더해준다. [기존의 list의 지정한 위치에 다른 요소 추가] # append() 예시 : list의..
https://pytorch.org/docs/stable/generated/torch.nn.ReLU.html를 기반으로 작성하였음 CLASS torch.nn.ReLU(inplace=False) Rectified linear unit fuction을 element 별로 적용 $$ ReLU(x) = (x)^{+} = max(0,x) $$ Parameters inplace - 선택적으로 in-place에서 연산을 수행할 수 있으며, default는 False임. (만약 inplace=True로 설정하면 inpurt 들어온 것 자체에서 연산을 수행함) Shape Input : (*), 여기서 *는 임의의 dimension의 수를 의미함 Output : (*), input과 똑같은 shape임.
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) : 추가할 모듈의 ite..
https://pytorch.org/docs/stable/generated/torch.nn.BatchNorm2d.html를 기반으로 작성하였음. CLASS torch.nn.BatchNorm2d( num_features, eps=1e-05, momentum=0.1, affine=True, track_runing_stats=True, device=None, dtype=None ) Batch Normalization $$ y=\frac{x-E[x]}{\sqrt{Var[x]+\epsilon}} *\gamma +\beta $$ 각 batch 별로 평균(mean)과 분산(variance)를 이용해 정규화하는 것을 의미함 파라미터 num_features : input size $(N,C,H,W)$에서 $C$ ($N$..
CLASS torch.nn.Conv2d( in_channels, out_channels, kernel_size, stride=1, padding=0, dilataion=1, groups=1, bias=True, padding_mode='zeros', device=None, dtype=None ) Conv 2d에서 필수적으로 입력되어야 하는 파라미터는 in_channels, out_channels, kernel_size 임. Input에 2D convolution 연산을 적용하는 함수이며, input size가 $(N,C_{in},H,W)$이면 output size는 $(N, C_{out}, H_{out}, W_{out})$ 이며, 관련하여 input/output에 관한 식은 아래와 같음. $$ out(N..
Python 3.7에서부터 생기는 오류로, cuda()에서 async 옵션을 작성하면 syntax 오류가 발생함 async 옵션을 non-blocking으로 수정해주면 됨! cuda(async=True) #--> 수정하기 cuda(non_blocking=True)
CMD에서 tensorboard 실행 하였을 때 'tensorboard'은(는) 내부 또는 외부 명령, 실행할 수 있는 프로그램, 또는 배치 파일이 아닙니다. 라는 오류가 발생하면 python -m tensorboard.main --logdir=log_dir 으로 동작해주면 됨.
멀티 프로세싱(multi processing)은 시간이 오래 걸리고 복잡한 여러 작업들을 별도의 프로세스에 생성하여 이를 병렬 처리(parallel processing)를 하여 작업이 좀 더 빠르게 처리할 수 있도록 한다. 다만, 이 프로세스들은 각자가 고유 메모리 영역을 가지고 있기 때문에 메모리 사용이 늘어난다는 단점이 있으므로 잘 활용해야 한다. 멀티프로세싱 예제 멀티프로세싱 사용여부에 따른 처리속도 비교 # 멀티프로세싱을 활용하지 않았을 때 import time import os #1초간 sleep하는 함수 def time_to_sleep(a): print(a) print(os.getpid) time.sleep(1) sleep_list = ['0', '1', '2', '3'] start = tim..