class_docstr: Grid+Random Recipe for MTNet
docstr: __init__()
  Constructor.
  
  :param num_rand_samples: number of hyper-param configurations sampled randomly
  :param training_iteration: no. of iterations for training (n epochs) in trials
  :param epochs: no. of epochs to train in each iteration
  :param time_step: random search candidates for model param "time_step"
  :param long_num: random search candidates for model param "long_num"
  :param ar_size: random search candidates for model param "ar_size"
  :param batch_size: grid search candidates for batch size
  :param cnn_height: random search candidates for model param "cnn_height"
  :param cnn_hid_size: random search candidates for model param "cnn_hid_size"
docstr_tok: ["__init__","(",")","Constructor",".",":","param","num_rand_samples",":","number","of","hyper-param","configurations","sampled","randomly",":","param","training_iteration",":","no",".","of","iterations","for","training","(","n","epochs",")","in","trials",":","param","epochs",":","no",".","of","epochs","to","train","in","each","iteration",":","param","time_step",":","random","search","candidates","for","model","param","``","time_step","''",":","param","long_num",":","random","search","candidates","for","model","param","``","long_num","''",":","param","ar_size",":","random","search","candidates","for","model","param","``","ar_size","''",":","param","batch_size",":","grid","search","candidates","for","batch","size",":","param","cnn_height",":","random","search","candidates","for","model","param","``","cnn_height","''",":","param","cnn_hid_size",":","random","search","candidates","for","model","param","``","cnn_hid_size","''"]
code: def __init__(
      self,
      num_rand_samples=1,
      epochs=5,
      training_iteration=10,
      time_step=[3, 4],
      long_num=[3, 4],
      cnn_height=[2, 3],
      cnn_hid_size=[32, 50, 100],
      ar_size=[2, 3],
      batch_size=[32, 64],
  ):
      """
      __init__()
      Constructor.
  
      :param num_rand_samples: number of hyper-param configurations sampled randomly
      :param training_iteration: no. of iterations for training (n epochs) in trials
      :param epochs: no. of epochs to train in each iteration
      :param time_step: random search candidates for model param "time_step"
      :param long_num: random search candidates for model param "long_num"
      :param ar_size: random search candidates for model param "ar_size"
      :param batch_size: grid search candidates for batch size
      :param cnn_height: random search candidates for model param "cnn_height"
      :param cnn_hid_size: random search candidates for model param "cnn_hid_size"
      """
      super(self.__class__, self).__init__()
      # -- run time params
      self.num_samples = num_rand_samples
      self.training_iteration = training_iteration
  
      # -- optimization params
      self.lr = hp.uniform(0.001, 0.01)
      self.batch_size = hp.grid_search(batch_size)
      self.epochs = epochs
  
      # ---- model params
      self.cnn_dropout = hp.uniform(0.2, 0.5)
      self.rnn_dropout = hp.uniform(0.2, 0.5)
      self.time_step = hp.choice(time_step)
      self.long_num = hp.choice(
          long_num,
      )
      self.cnn_height = hp.choice(cnn_height)
      self.cnn_hid_size = hp.choice(cnn_hid_size)
      self.ar_size = hp.choice(ar_size)
      self.past_seq_len = hp.sample_from(
          lambda spec: (spec.config.long_num + 1)
          * spec.config.time_step
      )
  
imports: from bigdl.chronos.autots.deprecated.config.base import Recipe
  from bigdl.orca.automl import hp
  from bigdl.chronos.utils import deprecated
label_desc: Use image node_id 1 to create a new MTNetGridRandomRecipe object from inherited base classes: Recipe with example: obj = MTNetGridRandomRecipe(num_rand_samples, epochs, training_iteration, time_step, long_num, cnn_height, cnn_hid_size, ar_size, batch_size)