Post

[Deep Learning] keras 콜백 함수 ReduceLROnPlateau

keras 콜백 함수인 ReduceLROnPlateau에 대해 알아보자.

[Tensorflow 공식 문서]

✅ ReduceLROnPlateau

모델의 성능 개선이 없을 경우 Learning Rate를 조절하는 Callback 함수이다.

1
2
3
4
5
6
7
8
from tf.keras.callbacks import ReduceLROnPlateau

lr_reduction = ReduceLROnPlateau(monitor='val_loss',
                                 factor=0.5,
                                 patience=5,
                                 min_lr=0.000001)

model.fit(x, y, callbacks=[lr_reduction])

파라미터 중 factor는 Learning Rate를 줄일 비율이다. new_lr = lr * factor

자세한 파라미터는 공식문서를 참고하면 될 듯하다.

This post is licensed under CC BY 4.0 by the author.

[Deep Learning] Model 저장 및 로드

[Deep Learning] YOLO V3를 사용해보자!