set_flat_parameters

class maze.train.trainers.es.es_utils.set_flat_parameters(policy: maze.core.agent.torch_policy.TorchPolicy, flat_params: torch.Tensor)

Overwrite the parameters of all sub-policies by a single flat vector.

Parameters
  • policy – target policy

  • flat_params – concatenated vector