Deep Reinforcement Learning v Pythonu
Timothée Carayol
Principal Machine Learning Engineer, Komment
| Příklady |
|---|
| Diskontní faktor |
| PPO: clipping epsilon, entropický bonus |
| Experience replay: velikost bufferu, batch size |
| Rozvrh klesajícího epsilon-greedy |
| Fixní Q-targety: $\tau$ |
| Rychlost učení |
| Počet vrstev, uzlů na vrstvu... |
Cíl: průměrné kumulativní odměny
Metody prohledávání hyperparametrů:


Pracovní postup 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}
V účelové funkci:
Plná flexibilita při specifikaci hyperparametrů:
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 výchozím samplerem (TPE)n_trials: běží až do přerušení
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)

Deep Reinforcement Learning v Pythonu