Skip to content

Instantly share code, notes, and snippets.

@itsnamgyu
Last active October 16, 2019 05:41
Show Gist options
  • Select an option

  • Save itsnamgyu/d2b62f308615c1355523298c0bd46104 to your computer and use it in GitHub Desktop.

Select an option

Save itsnamgyu/d2b62f308615c1355523298c0bd46104 to your computer and use it in GitHub Desktop.

모듈 업데이트

git stash # 수정된 파일 내용 저장
git reset --hard HEAD~20
git pull
git stash pop # 저장된 수정 사항 복구 (충돌 발생 가능)

폴더 구조 업데이트

기존 core/.fine_model_weightsoutputs/trained_weights 폴더로 옮겼습니다

mkdir -p output/trained_weights
mv core/.fine_model_weights/* output/trained_weights

학습 후 출력 파일은 다음과 같이 정리할 수 있습니다:

테스트 결과

output/results/<MODEL>/<KEY>/cr_result.json

학습된 모델 Weights

  • output/trained_weights/<MODEL>/<KEY>.hd5

학습 추이 (Train/Val Loss/Acc)

  • <EXP_FOLDER>/cr_train_val_history/<MODEL>/<KEY>.csv

학습 모듈 업데이트

기존 experiments/deep_3/main.py 학습 모듈도 업데이트 후 테스트를 마쳤습니다. 아래와 같이 코드 초반부에 학습 설정 관련된 변수를 지정해줄 수 있습니다. 주석에 있는 설명을 참고해서 값을 조절하시면 됩니다.

EPOCHS = 50
# experiment index to track saved model weights, training history etc.
# iterate this index for each run (make sure to keep track of this index)
EXP = 101
# whether to sample 10% of all slices (for sanity checking purposes)
SAMPLE = False
# seed for k-fold split
K_SPLIT_SEED = 1
# models to train
MODEL_KEYS = [
    'baselinemodelv1'
    #'xception',
    #'mobileneta25',
    #'mobilenetv2a35',
    #'vgg16',
    #'resnet50v2',
    #'inception_v3',
    #'inception_resnet_v2',
    #'densenet121',
    #'nasnet_mobile',
]

# Setup the module to train for one specific learning rate (0...2)
# LR_INDEX = None: train on all learning rates
LR_INDEX = 0

# Setup the module to train for one specific fold (0...4)
# FOLD_INDEX = None: train on all folds
FOLD_INDEX = 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment