AI
-
Model profilingAI/DL 2024. 4. 25. 16:45
Profiler- 모델 추론, 연산 시 특정 구간이 얼마만큼의 속도를 갖는지 확인 Pytorch Profiler- pytorch에 내장된 APIimport torchimport torchvision.models as modelsfrom torch.profiler import profile, record_function, ProfilerActivity# Instantiated a simple ResNet modelmodel = models.resnet18()# Make mini-batchinputs = torch.randn(5,3,224,224) # 5 samples, 3 channels, 224*224 size# Using profiler to analyze execution timewith profil..
-
GPU utilizationAI/DL 2024. 4. 25. 11:59
GPU utilization을 높게 유지하는 것이 훈련을 효율적으로 하기에 중요하다.그렇다면 어떻게 Keeping GPU utilization high??- Training 시 nvidia-smi 명령어로, GPU uilization % 가 constant 하게 유지되는지 확인이 필요: %는 총 있는 core 중 사용하는 % (개수, 시간)을 의미함 - Mini batch: size가 클수록 GPU memory를 많이 사용: training 시에는 activation / mini batch 저장에 memory가 많이 사용됨: OOM (out of memory) 오류가 나기 직전까지 minibatch size를 최대화시킴: Rule of Thumb - 미니배치 사이즈 키워~~ *FLOPS (FLoating..
-
Neural Network의 기본AI/DL 2024. 3. 16. 18:51
DL (deep learning) 이란? : feature extraction & decision making을 machine이 수행 : 인간이 feature selection을 했을 때의 일반화 한계를 극복 : 여러 layer를 거쳐가며 feature를 뽑음 (원초적인 low-level feature -> 추상적 high-level feature) : 학습에 사용된 데이터 양이 많아질수록 accuracy가 높아짐 Perceptron : 하나의 뉴런에 대한 수학적 모델링 : input * weight의 sum -> activation function -> output Batch computing : 컴퓨터는 scalr, vector (dot-production) 연산보다 matrix*matrix mult..