class_docstr: Population class
      
class_docstr_tok: ["Population","class"]
code: def __init__(
      self, search_space, opt_mode, n_states, n_steps, hidden_size, lr
  ):
      self.search_space = search_space
      self.opt_mode = opt_mode
      self.n_states = n_states
      self.n_steps = n_steps
      self.hidden_size = hidden_size
      self.lr = lr
  
      self.config = Configuration(search_space)
      self.max_reward = 0.0
  
      self.action_space = self.config.get_actions()
      self.dim_actions = len(self.action_space)
      self.dim_states = len(self.config.to_torch())
      self.log_probs = []
      self.values = []
      self.rewards = []
  
      self.population = []
  
      self.actor_critic = ActorCritic(
          self.dim_states, self.dim_actions, self.hidden_size
      )
      self.ac_optimizer = optim.Adam(
          self.actor_critic.parameters(), lr=self.lr
      )
  
imports: import math
  import random
  import logging
  import copy
  import torch
  from torch import optim
  from torch import nn
  import torch.nn.functional
  import numpy
  import nni
  from nni.tuner import Tuner
label_desc: Use image node_id 1 to create a new Population object from inherited base classes: object with example: obj = Population(search_space, opt_mode, n_states, n_steps, hidden_size, lr)