class_docstr: N-A2C Tuner
  Based on paper Compiler-Level Matrix Multiplication Optimization for Deep Learning
  
  Parameters
  ----------
  optimize_mode: str, 'maximize' or 'minimize'
  n_states: int,
      The maximum search steps Tau
  n_steps: int
      number of steps to train the policy and critic networks each iteration
  hidden_size: int,
      number of hidden size of the policy and critic networks
  lr: float,
      learning rate of the policy and critic networks
class_docstr_tok: ["N-A2C","Tuner","Based","on","paper","Compiler-Level","Matrix","Multiplication","Optimization","for","Deep","Learning","Parameters","--","--","--","--","--","optimize_mode",":","str",",","'maximize","'","or","'minimize'","n_states",":","int",",","The","maximum","search","steps","Tau","n_steps",":","int","number","of","steps","to","train","the","policy","and","critic","networks","each","iteration","hidden_size",":","int",",","number","of","hidden","size","of","the","policy","and","critic","networks","lr",":","float",",","learning","rate","of","the","policy","and","critic","networks"]
docstr: Update the self.bounds and self.types by the search_space.json file.
  
  Override of the abstract method in :class:`~nni.tuner.Tuner`.
docstr_tok: ["Update","the","self.bounds","and","self.types","by","the","search_space.json","file",".","Override","of","the","abstract","method","in",":","class",":","`","~nni.tuner.Tuner","`","."]
code: def update_search_space(self, search_space):
      """Update the self.bounds and self.types by the search_space.json file.
  
      Override of the abstract method in :class:`~nni.tuner.Tuner`.
      """
      if not isinstance(search_space, dict):
          self.logger.info("The format of search space is not a dict.")
          raise RuntimeError(
              "The format of search space is not a dict."
          )
  
      self.population = Population(
          search_space,
          self.opt_mode,
          self.n_states,
          self.n_steps,
          self.hidden_size,
          self.lr,
      )
  
      if not self.serve_list:
          self.serve_list = self.population.generate()
  
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 2 for calling the N_A2C obj's underlying member method code with example usage: obj.update_search_space(search_space) without return types