當前位置: 首頁>>代碼示例>>Python>>正文


Python monitor.load_results方法代碼示例

本文整理匯總了Python中baselines.bench.monitor.load_results方法的典型用法代碼示例。如果您正苦於以下問題:Python monitor.load_results方法的具體用法?Python monitor.load_results怎麽用?Python monitor.load_results使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在baselines.bench.monitor的用法示例。


在下文中一共展示了monitor.load_results方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: plot_results

# 需要導入模塊: from baselines.bench import monitor [as 別名]
# 或者: from baselines.bench.monitor import load_results [as 別名]
def plot_results(dirs, num_timesteps, xaxis, task_name):
    tslist = []
    for dir in dirs:
        ts = load_results(dir)
        ts = ts[ts.l.cumsum() <= num_timesteps]
        tslist.append(ts)
    xy_list = [ts2xy(ts, xaxis) for ts in tslist]
    plot_curves(xy_list, xaxis, task_name)

# Example usage in jupyter-notebook
# from baselines import log_viewer
# %matplotlib inline
# log_viewer.plot_results(["./log"], 10e6, log_viewer.X_TIMESTEPS, "Breakout")
# Here ./log is a directory containing the monitor.csv files 
開發者ID:Hwhitetooth,項目名稱:lirpg,代碼行數:16,代碼來源:results_plotter.py

示例2: plot_results

# 需要導入模塊: from baselines.bench import monitor [as 別名]
# 或者: from baselines.bench.monitor import load_results [as 別名]
def plot_results(dirs, num_timesteps, xaxis, yaxis, task_name):
    tslist = []
    for dir in dirs:
        ts = load_results(dir)
        ts = ts[ts.l.cumsum() <= num_timesteps]
        tslist.append(ts)
    xy_list = [ts2xy(ts, xaxis, yaxis) for ts in tslist]
    plot_curves(xy_list, xaxis, yaxis, task_name)

# Example usage in jupyter-notebook
# from baselines import log_viewer
# %matplotlib inline
# log_viewer.plot_results(["./log"], 10e6, log_viewer.X_TIMESTEPS, "Breakout")
# Here ./log is a directory containing the monitor.csv files 
開發者ID:hiwonjoon,項目名稱:ICML2019-TREX,代碼行數:16,代碼來源:results_plotter.py


注:本文中的baselines.bench.monitor.load_results方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。