-
CFG 파라미터 정리AI/Darknet 2023. 1. 17. 18:09
[net]
ex) batch=1 : batch size를 의미하며 한번에 처리될 샘플의 수
ex ) subdivisions=1 : 한개의 배치에 포함된 mini batch의 수 , mini_batch = batch / subdivisions 이고 GPU는 mini_batch 샘플을 한 번에 처리하고 가중치는 batch에 대해 업데이트됨(1 iteration 기준 batch 1이라고 생각하면 됨)
일반적으로 Epoch을 생각 하는데 Epoch은 전체 데이터 세트를 한번 돌린게 1 epoch 이다.
따라서 Image가 1000개 있고 batch 가 25라면 40 iteration이 1 epoch과 동일 하다.ex ) width = 416 : 네트워크 크기(너비)
ex ) height = 416 : 네트워크 크기(높이)
ex ) max_chart_loss=20 : 학습이 진행되며 생성되는 chart.png에서 그래프의 최대 손실값
학습시
Contrastive loss
ex ) contrastive = 1 [contrastive] : classifier 훈련을 위해 Supervised contrastive loss 사용 (레이어와 함께 사용되야함)
ex ) unsupervised =1 contrastive=1 : 라벨이 없는 이미지에서 분류기를 훈현하기 위해 Unsupervised contrastive loss를 사용한다.
Data augmentation
ex ) angle = 0 : 훈련 중 이미지를 무작위로 회전(분류만 해당)ex ) saturation = 1.5 : 훈련 중 이미지의 채도를 임의로 변경ex ) expouser = 1.5 : 훈련 중 노출(밝기)을 임의로 변경ex ) hue = .1 : 훈련 중 색조(색상)을 무작위로 변경 (
https://en.wikipedia.org/wiki/HSL_and_HSV)
HSL and HSV - Wikipedia
From Wikipedia, the free encyclopedia Jump to navigation Jump to search Alternative representations of the RGB color model Fig. 1. HSL (a–d) and HSV (e–h). Above (a, e): cut-away 3D models of each. Below: two-dimensional plots showing two of a model’
en.wikipedia.org
ex ) blur = 1 : 블러는 50%의 확률로 무작위로 적용됨 (1일때는 객체를 제외한 배경을 흐리게하고, 1보다 클 경우 전체 이미지를 블러 처리함)
ex ) min_crop = 224 : 임의로 잘라낸 이미지의 최소 크기(Classifier 전용)
ex ) max_crop = 224 : 임의로 잘라낸 이미지의 최대 크기(Classifier 전용)
ex ) aspect = .75 : 종회비 (1/0.75)로 변경
ex ) letter_box =1 : 학습 중 이미지의 가로세로 비율 유지(OD 학습시에 가능, 추론시 명령어에 letter_box 넣어줘야 사용가능)
ex ) cutmix = 1 : CutMix 데이터 증강 사용(Classifier 전용)
ex ) mosaic = 1 : Mosaic 데이터 증강 사용 (한번에 4개의 이미지 적용)
ex ) mosaic_bound = 1 : mosaic을 사용해 데이터를 확대할때 bounding box가 이미지 경계를 벗어나지 않도록 설정
ex ) [yolo] layer의 데이터 증강
- jitter = 0.3 : 임의로 이미지 크기와 종횡비를 x(1 - 2*jitter) -> x(1 + 2*jitter) 변경
- random = 1 : 네트워크 크기의 초기 종횡비를 유지하면서 최소 /1.4배 에서 x1.4배 까지 10배치 단위로 반복하면서 무작위로 조정(네트워크 크기는 32배수)
ex) adversarial_lr = 1.0 : GAN 신경망 구현시 사용
ex ) gaussian_noise = 1 : 가우시안 노이즈 추가
Optimizator
ex ) momentum = 0.9 : 경사 하강법으로 이동할때 관성을 부여하는 최적화 기법(UC버클리 교수는 일반적으로 momentum의 값이 0.9가 좋다고함)
ex ) decay = 0.0005 : 학습을 하면서 과적합 방지 및 local minimum에 빠지지 않고 학습 속도를 개선하기 위한 기법(steps, Exponential, 1t) http://cs231n.github.io/neural-networks-3/
CS231n Convolutional Neural Networks for Visual Recognition
Table of Contents: Learning In the previous sections we’ve discussed the static parts of a Neural Networks: how we can set up the network connectivity, the data, and the loss function. This section is devoted to the dynamics, or in other words, the proce
cs231n.github.io
ex ) learning_rate = 0.001 : 초기 learning_rate 설정값
ex ) max_batches = 500200 : 학습의 최대 iteration 회수
ex ) policy : learning_rate 변경 정책 - decay를 어떻게 적용할건지 (sgdr, steps, step, sig, exp, poly, random)
ex ) sgdr_cycle = 1000 : policy 가 sgdr일 경우 사용하며 코사인 주기의 초기 반복 횟수
ex ) sgdr_mult = 2 : policy 가 sgdr일 경우 코사인 주기 승수
A Newbie's Guide to Stochastic Gradient Descent With Restarts
An additional method that makes gradient descent smoother and faster, and minimizes the loss of a neural network more accurately.
towardsdatascience.com
ex ) steps = 8000, 9000, 12000 : policy가 steps인 경우 이때 learning rate에 scales 값이 곱해진다.
ex ) scales = .1, .1, .1 : policy가 steps인 경우, 만약 steps가 8000, 9000, 12000 이고 scales이 .1, .1, .1 고 iteration 이 10000이라면 current_learning_rate = learning_rate * scalse[0] * scalse[1]
ex ) label_smooth_eps = 0.1 : Classifier 학습을 위해 라벨 스무딩 사용
'AI > Darknet' 카테고리의 다른 글
Darknet yolov5 implementation (1) 2023.01.25 yolov4 cuda 10.0 (0) 2023.01.25 Yolov4 설치 (0) 2023.01.17 Darknet (0) 2023.01.17