Caffe 초기 습득 (1) 간단한 명령
본고는 CIFAR-10 데이터 세트의 예를 들어 Caffe의train과test 조작에 대해 간단하게 설명한다.
1. solver.prototxt 및cifar10full_train_test.prototxt 차이점:
CIFAR-10 트레이닝 네트워크 프로필과 테스트 네트워크 프로필은 같은cifar10full_train_test.prototxt 파일.
일반적인 경우 모델 폴더의 AlexNet처럼 세 개가 나타납니다.prototxt 파일, 그중trainval.protxt는 이와 유사합니다.
그리고solver.prototxt는 전역 파라미터를 포함하는 설정 파일로train과fine-tuning에 주로 사용되며test에서는 필요하지 않습니다.
2. cifar10_full_train_test.prototxt의 데이터 입력:
layer {
name: "cifar"
type: "Data"
top: "data"
top: "label"
include {
phase: TRAIN
}
transform_param {
mean_file: "examples/cifar10/mean.binaryproto"
}
data_param {
source: "examples/cifar10/cifar10_train_lmdb"
batch_size: 100
backend: LMDB
}
}
layer {
name: "cifar"
type: "Data"
top: "data"
top: "label"
include {
phase: TEST
}
transform_param {
mean_file: "examples/cifar10/mean.binaryproto"
}
data_param {
source: "examples/cifar10/cifar10_test_lmdb"
batch_size: 100
backend: LMDB
}
}
1에서 말한 바와 같이 여기서 정의한다
train
그리고
test
의 입력 데이터 경로입니다.
3. cifar10_quick_solver.prototxt 설명:
# Carry out testing every 500 training iterations.
test_interval: 500
500회 훈련마다 한 번씩 검증 테스트()
validation
), 훈련이 끝날 때까지 테스트를 하는 것은 아니다(
test
).
# snapshot intermediate results
snapshot: 4000
snapshot_format: HDF5
하면, 만약, 만약...
snapshot_format: HDF5
생성
.h5
훈련이나
fine-tuning.
이 문장을 주석해 버리면 생성됩니다.ffemodel 접두사 값 파일, 계속 훈련하기,fine-tuning,test에 사용됩니다.
4.훈련:
caffe train \
--solver=examples/cifar10/cifar10_quick_solver.prototxt
네트워크 구조
cifar10_quick_solver.prototxt
파일의 위치:
net: "examples/cifar10/cifar10_quick_train_test.prototxt"
5. 이용
snapshot
계속 훈련:
caffe train \
--solver=examples/cifar10/cifar10_quick_solver_lr1.prototxt \
--snapshot=examples/cifar10/cifar10_quick_iter_4000.solverstate.h5
4000회 교체된 스냅샷 활용
.h5
6. 테스트:
sudo caffe test \
--model=./examples/cifar10/cifar10_train_test.prototxt --weights=./examples/cifar10/cifar10_quick_iter_5000.caffemodel --iterations 100 -gpu all
모든 것을 사용하다
GPU
이전 5000회 교체 후 획득한 모델 불러오기
이 내용에 흥미가 있습니까?
현재 기사가 여러분의 문제를 해결하지 못하는 경우 AI 엔진은 머신러닝 분석(스마트 모델이 방금 만들어져 부정확한 경우가 있을 수 있음)을 통해 가장 유사한 기사를 추천합니다:
pix2pix 모델을 사용해보기이번은 최근 떡으로 소문의 pix2pix 모델을 인스톨 해, 사용해 본다. 라벨에서 이미지를 생성하거나 항공 사진에서 지도를 생성하는 등 여러가지 할 수 있는 것 같다. 논문은 P. Isola 등의 Image-to-...
텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
CC BY-SA 2.5, CC BY-SA 3.0 및 CC BY-SA 4.0에 따라 라이센스가 부여됩니다.