내 세상

[Tensorflow] resnet50 config file error 해결 방법 본문

Technical/ML&DL

[Tensorflow] resnet50 config file error 해결 방법

sga8 2019. 2. 13. 16:47
728x90
반응형

에러


ValueError: No variables to save


https://github.com/tensorflow/models/tree/master/research/object_detection


위 경로의 Tensorflow object detection api를 테스트해볼 때, 모든 전반부 과정 후 train.py 실행시킨 다음 뜨는 에러.

ssd_mobilenet_v1_coco를 모델로 사용할 때는 발생하지 않았으나, ssd_resnet_50_fpn_coco를 모델로 사용할 때 발생함.



해결 방법


pipeline.config 파일 내에 소스 코드 한 줄 추가하여 해결할 수 있음.

아래에 위치에 빨간색으로 표시된 라인을 넣어서 해결하세요 


train_config: {
batch_size: 24
optimizer {
rms_prop_optimizer: {
learning_rate: {
exponential_decay_learning_rate {
initial_learning_rate: 0.004
decay_steps: 800720
decay_factor: 0.95
}
}
momentum_optimizer_value: 0.9
decay: 0.9
epsilon: 1.0
}
}
fine_tune_checkpoint: "pre-trained-model/model.ckpt"
from_detection_checkpoint: true                                                                                     
# Note: The below line limits the training process to 200K steps, which we
# empirically found to be sufficient enough to train the pets dataset. This
# effectively bypasses the learning rate schedule (the learning rate will
# never decay). Remove the below line to train indefinitely.
num_steps: 200000
data_augmentation_options {
random_horizontal_flip {
}
}
data_augmentation_options {
ssd_random_crop {
}
}
}



안녕~

728x90
반응형