class_docstr: Abstract baseclass of an optimizer to be used with ES.
docstr: Two-stage construction to enable construction from config-files.
  
  :param policy: ES policy network to optimize
docstr_tok: ["Two-stage","construction","to","enable","construction","from","config-files",".",":","param","policy",":","ES","policy","network","to","optimize"]
code: def setup(self, policy: TorchModel) -> None:
      """Two-stage construction to enable construction from config-files.
  
      :param policy: ES policy network to optimize
      """
      self.policy = policy
      self.dim = policy.num_params
      self.t = 0
  
file_path: maze/maze/train/trainers/es/optimizers/base_optimizer.py
imports: from abc import ABC, abstractmethod
  from typing import Optional
  import numpy
  from maze.core.agent.torch_model import TorchModel
  from maze.train.trainers.es.es_utils import get_flat_parameters, set_flat_parameters
label_desc: Use image node_id 2 for calling the Optimizer obj's underlying member method code with example usage: obj.setup(policy) without return types