class_docstr: Example:
      >>> #The dataset is split into x_train, x_val, x_test, y_train, y_val, y_test
      >>> model = MTNetForecaster(target_dim=1,
                                  feature_dim=x_train.shape[-1],
                                  long_series_num=6,
                                  series_length=2
                                  )
      >>> model.fit(data=(x_train, y_train),
                    validation_data=(x_val, y_val),
                    epochs=2,
                    batch_size=32)
      >>> model.predict(x_test, batch_size=batch_size)
class_docstr_tok: ["Example",":",">",">",">","#","The","dataset","is","split","into","x_train",",","x_val",",","x_test",",","y_train",",","y_val",",","y_test",">",">",">","model","=","MTNetForecaster","(","target_dim=1",",","feature_dim=x_train.shape","[","-1","]",",","long_series_num=6",",","series_length=2",")",">",">",">","model.fit","(","data=","(","x_train",",","y_train",")",",","validation_data=","(","x_val",",","y_val",")",",","epochs=2",",","batch_size=32",")",">",">",">","model.predict","(","x_test",",","batch_size=batch_size",")"]
docstr: Build a MTNet Forecast Model.
  
  :param target_dim: the dimension of model output
  :param feature_dim: the dimension of input feature
  :param long_series_num: the number of series for the long-term memory series
  :param series_length: the series size for long-term and short-term memory series
  :param ar_window_size: the auto regression window size in MTNet
  :param cnn_hid_size: the hidden layer unit for cnn in encoder
  :param rnn_hid_sizes: the hidden layers unit for rnn in encoder
  :param cnn_height: cnn filter height in MTNet
  :param metric: the metric for validation and evaluation
  :param uncertainty: whether to enable calculation of uncertainty
  :param lr: learning rate
  :param loss: the target function you want to optimize on
  :param cnn_dropout: the dropout possibility for cnn in encoder
  :param rnn_dropout: the dropout possibility for rnn in encoder
docstr_tok: ["Build","a","MTNet","Forecast","Model",".",":","param","target_dim",":","the","dimension","of","model","output",":","param","feature_dim",":","the","dimension","of","input","feature",":","param","long_series_num",":","the","number","of","series","for","the","long-term","memory","series",":","param","series_length",":","the","series","size","for","long-term","and","short-term","memory","series",":","param","ar_window_size",":","the","auto","regression","window","size","in","MTNet",":","param","cnn_hid_size",":","the","hidden","layer","unit","for","cnn","in","encoder",":","param","rnn_hid_sizes",":","the","hidden","layers","unit","for","rnn","in","encoder",":","param","cnn_height",":","cnn","filter","height","in","MTNet",":","param","metric",":","the","metric","for","validation","and","evaluation",":","param","uncertainty",":","whether","to","enable","calculation","of","uncertainty",":","param","lr",":","learning","rate",":","param","loss",":","the","target","function","you","want","to","optimize","on",":","param","cnn_dropout",":","the","dropout","possibility","for","cnn","in","encoder",":","param","rnn_dropout",":","the","dropout","possibility","for","rnn","in","encoder"]
code: def __init__(
      self,
      target_dim=1,
      feature_dim=1,
      long_series_num=1,
      series_length=1,
      ar_window_size=1,
      cnn_height=1,
      cnn_hid_size=32,
      rnn_hid_sizes=[16, 32],
      lr=0.001,
      loss="mae",
      cnn_dropout=0.2,
      rnn_dropout=0.2,
      metric="mean_squared_error",
      uncertainty: bool = False,
  ):
      """
      Build a MTNet Forecast Model.
  
      :param target_dim: the dimension of model output
      :param feature_dim: the dimension of input feature
      :param long_series_num: the number of series for the long-term memory series
      :param series_length: the series size for long-term and short-term memory series
      :param ar_window_size: the auto regression window size in MTNet
      :param cnn_hid_size: the hidden layer unit for cnn in encoder
      :param rnn_hid_sizes: the hidden layers unit for rnn in encoder
      :param cnn_height: cnn filter height in MTNet
      :param metric: the metric for validation and evaluation
      :param uncertainty: whether to enable calculation of uncertainty
      :param lr: learning rate
      :param loss: the target function you want to optimize on
      :param cnn_dropout: the dropout possibility for cnn in encoder
      :param rnn_dropout: the dropout possibility for rnn in encoder
      """
      self.check_optional_config = False
      self.mc = uncertainty
      self.model_config = {
          "feature_num": feature_dim,
          "output_dim": target_dim,
          "metrics": [metric],
          "mc": uncertainty,
          "time_step": series_length,
          "long_num": long_series_num,
          "ar_window": ar_window_size,
          "cnn_height": cnn_height,
          "past_seq_len": (long_series_num + 1) * series_length,
          "cnn_hid_size": cnn_hid_size,
          "rnn_hid_sizes": rnn_hid_sizes,
          "lr": lr,
          "cnn_dropout": cnn_dropout,
          "rnn_dropout": rnn_dropout,
          "loss": loss,
      }
      super().__init__()
  
      self._fitted = False
      self.internal = MTNetKerasModel(
          check_optional_config=self.check_optional_config
      )
  
file_path: BigDL/python/chronos/src/bigdl/chronos/forecaster/tf/mtnet_forecaster.py
imports: from bigdl.chronos.model.tf2.MTNet_keras import MTNetKeras
  from bigdl.chronos.forecaster.abstract import Forecaster
  from bigdl.chronos.metric.forecast_metrics import Evaluator
label_desc: Use image node_id 1 to create a new MTNetForecaster object from inherited base classes: Forecaster with example: obj = MTNetForecaster(target_dim, feature_dim, long_series_num, series_length, ar_window_size, cnn_height, cnn_hid_size, rnn_hid_sizes, lr, loss, cnn_dropout, rnn_dropout, metric, uncertainty)