cleanup
Syntax
Description
When you define a custom training loop for reinforcement learning, you can
simulate an agent or policy against an environment using the runEpisode
function. Use the cleanup
function to clean up the environment after
running simulations using multiple calls to runEpisode
. To clean up the
environment after each simulation, you can configure runEpisode
to
automatically call the cleanup
function at the end of each
episode.
Also use cleanup
to perform clean up tasks for a
FileLogger
or MonitorLogger
object after logging data
within a custom training loop.
Environment Objects
Data Logger Objects
cleanup(
cleans up the specified data
logger object after logging data within a custom training loop. This task might involve
for example transferring any remaining data from lgr
)lgr
internal memory
to a logging target (either Log Data to Disk in a Custom Training Loop a MAT-file or a trainingProgressMonitor
object).
Examples
Input Arguments
Version History
Introduced in R2022a