From f9b9a18ffe0a6ed91c7b8412e78f6445ca90f01d Mon Sep 17 00:00:00 2001 From: Jun Tian Date: Wed, 17 Jun 2020 01:46:33 +0800 Subject: [PATCH] update doc --- src/core/hooks.jl | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/core/hooks.jl b/src/core/hooks.jl index 7c302eb..26c42df 100644 --- a/src/core/hooks.jl +++ b/src/core/hooks.jl @@ -179,6 +179,11 @@ struct BatchStepsPerEpisode <: AbstractHook step::Vector{Int} end +""" + BatchStepsPerEpisode(batch_size::Int; tag = "TRAINING") + +Similar to [`StepsPerEpisode`](@ref), but only work for [`BatchObs`](@ref) +""" function BatchStepsPerEpisode(batch_size::Int; tag = "TRAINING") BatchStepsPerEpisode([Int[] for _ in 1:batch_size], zeros(Int, batch_size)) end @@ -192,6 +197,7 @@ function (hook::BatchStepsPerEpisode)(::PostActStage, agent, env, obs::BatchObs) end end end + ##### # CumulativeReward #####