Python으로 배우는 Deep Reinforcement Learning
Timothée Carayol
Principal Machine Learning Engineer, Komment
| 예시 |
|---|
| 할인율 |
| PPO: 클리핑 엡실론, 엔트로피 보너스 |
| 경험 재현: 버퍼 크기, 배치 크기 |
| 감소형 엡실론 탐욕 스케줄 |
| 고정 Q-타깃: $\tau$ |
| 학습률 |
| 레이어 수, 레이어당 노드 수... |
목표: 평균 누적 보상
하이퍼파라미터 탐색 기법:


Optuna 워크플로:
study 생성
import optunadef objective(trial): ...study = optuna.create_study()study.optimize(objective, n_trials=100)
study.best_params
{'learning_rate': 0.001292481, 'batch_size': 8}
객관식 함수에서:
하이퍼파라미터 지정 완전 지원:
def objective(trial: optuna.trial.Trial):# Hyperparameters x and y between -10 and 10x = trial.suggest_float('x', -10, 10) y = trial.suggest_float('y', -10, 10)# Return the metric to minimize return (x - 2) ** 2 + 1.2 * (y + 3) ** 2
n_trials 시도n_trials 생략 시: 중단할 때까지 실행
import sqlite study = optuna.create_study( storage="sqlite:///DRL.db", study_name="my_study")study.optimize(objective, n_trials=100)
loaded_study = optuna.load_study(
study_name="my_study",
storage="sqlite:///DRL.db")
optuna.visualization.plot_param_importances(study)

optuna.visualization.plot_contour(study)

Python으로 배우는 Deep Reinforcement Learning