티스토리 뷰

Skills/etc

학습 할 때 yaml 파일의 용도

미남잉 2023. 4. 29. 22:40
728x90

YAML은 딥러닝 학습에서 매개변수 설정이나 구성 정보를 저장하는 데 사용되는 파일 형식 중 하나이다. YAML 파일은 일반적으로 모델 아키텍처, 데이터 경로, 하이퍼파라미터 등의 정보를 저장한다. 이러한 정보는 일반적으로 코드 내부에 하드코딩 되는 것보다 YAML 파일에서 불러와 사용하는 것이 더 효율적. 이렇게 하면 코드를 수정하지 않고도 모델의 설정 및 하이퍼파라미터를 쉽게 조정할 수 있다. 또한, YAML 파일은 읽기 쉽고 수정하기 쉬우며 다양한 프로그래밍 언어에서 지원된다.

 

이미지 캡셔닝을 위한 yaml 파일 예시

image_root: '/export/share/datasets/vision/nocaps/'
ann_root: 'annotation'

# set pretrained as a file path or an url
pretrained: 'https://storage.googleapis.com/sfr-vision-language-research/BLIP/models/model_base_caption_capfilt_large.pth'

vit: 'base'
batch_size: 32

image_size: 720

max_length: 20
min_length: 5
num_beams: 3
prompt: 'a photo of '
728x90

'Skills > etc' 카테고리의 다른 글

cityscapes 데이터셋 다운로드 방법  (0) 2023.05.28
mmcv.dump  (0) 2023.05.01
Installing Git on Linux  (0) 2023.03.20
[MacOS] Server 연결  (0) 2023.03.20
AttributeError: module 'cv2' has no attribute 'xfeatures2d'  (0) 2022.12.06
댓글