ray.rllib.models.modelv2.ModelV2.import_from_h5#

ModelV2.import_from_h5(h5_file: str) None[source]#

Imports weights from an h5 file.

Parameters:

h5_file – The h5 file name to import weights from.

from ray.rllib.algorithms.ppo import PPO
algo = PPO(...)
algo.import_policy_model_from_h5("/tmp/weights.h5")
for _ in range(10):
    algo.train()