Common Utilities¶
Common Utilities in RLzoo¶
Functions for utilization.
# Requirements tensorflow==2.0.0a0 tensorlayer==2.0.1
-
rlzoo.common.utils.
call_default_params
(env, envtype, alg, default_seed=True)[source]¶ Get the default parameters for training from the default script
-
rlzoo.common.utils.
get_algorithm_module
(algorithm, submodule)[source]¶ Get algorithm module in the corresponding folder
-
rlzoo.common.utils.
load_model
(model, model_name, algorithm_name, env_name)[source]¶ load saved neural network model
Parameters: - model – tensorlayer.models.Model
- model_name – string, e.g. ‘model_sac_q1’
- algorithm_name – string, e.g. ‘SAC’
-
rlzoo.common.utils.
plot
(episode_rewards, algorithm_name, env_name)[source]¶ plot the learning curve, saved as ./img/algorithm_name-env_name.png
Parameters: - episode_rewards – array of floats
- algorithm_name – string
- env_name – string
-
rlzoo.common.utils.
plot_save_log
(episode_rewards, algorithm_name, env_name)[source]¶ plot the learning curve, saved as ./img/algorithm_name-env_name.png, and save the rewards log as ./log/algorithm_name-env_name.npy
Parameters: - episode_rewards – array of floats
- algorithm_name – string
- env_name – string