docstr: Sequence-to-sequence model.
  
  Parameters
  ----------
  encoder_net
      Encoder network.
  decoder_net
      Decoder network.
  threshold_net
      Regression network used to estimate threshold.
  n_features
      Number of features.
  score_fn
      Function used for outlier score.
  beta
      Weight on the threshold estimation loss term.
  name
      Name of the seq2seq model.
docstr_tok: ["Sequence-to-sequence","model",".","Parameters","--","--","--","--","--","encoder_net","Encoder","network",".","decoder_net","Decoder","network",".","threshold_net","Regression","network","used","to","estimate","threshold",".","n_features","Number","of","features",".","score_fn","Function","used","for","outlier","score",".","beta","Weight","on","the","threshold","estimation","loss","term",".","name","Name","of","the","seq2seq","model","."]
code: def __init__(
      self,
      encoder_net: EncoderLSTM,
      decoder_net: DecoderLSTM,
      threshold_net: tf.keras.Model,
      n_features: int,
      score_fn: Callable = tf.math.squared_difference,
      beta: float = 1.0,
      name: str = "seq2seq",
  ) -> None:
      """
      Sequence-to-sequence model.
  
      Parameters
      ----------
      encoder_net
          Encoder network.
      decoder_net
          Decoder network.
      threshold_net
          Regression network used to estimate threshold.
      n_features
          Number of features.
      score_fn
          Function used for outlier score.
      beta
          Weight on the threshold estimation loss term.
      name
          Name of the seq2seq model.
      """
      super(Seq2Seq, self).__init__(name=name)
      self.encoder = encoder_net
      self.decoder = decoder_net
      self.threshold_net = threshold_net
      self.threshold_est = Dense(n_features, activation=None)
      self.score_fn = score_fn
      self.beta = beta
  
imports: import numpy
  import tensorflow
  from tensorflow.keras.layers import Bidirectional, Concatenate, Dense, Flatten, Layer, LSTM
  from typing import Callable, List, Tuple
  from alibi_detect.utils.tensorflow.distance import relative_euclidean_distance
label_desc: Use image node_id 1 to create a new Seq2Seq object from inherited base classes: tf.keras with example: obj = Seq2Seq(encoder_net, decoder_net, threshold_net, n_features, score_fn, beta, name)