class_docstr: Abstract custom Keras model.
  
   This model overwrites the following methods:
  - train_step
  - test_step
  - predict_step
  - save
  - load
  Cannot be used as tf.keras.Model.
class_docstr_tok: ["Abstract","custom","Keras","model",".","This","model","overwrites","the","following","methods",":","-","train_step","-","test_step","-","predict_step","-","save","-","load","Can","not","be","used","as","tf.keras.Model","."]
docstr: Initialize the RasaModel.
  
  Args:
      random_seed: set the random seed to get reproducible results
docstr_tok: ["Initialize","the","RasaModel",".","Args",":","random_seed",":","set","the","random","seed","to","get","reproducible","results"]
code: def __init__(
      self, random_seed: Optional[int] = None, **kwargs: Any
  ) -> None:
      """Initialize the RasaModel.
  
      Args:
          random_seed: set the random seed to get reproducible results
      """
      # make sure that keras releases resources from previously trained model
      tf.keras.backend.clear_session()
      super().__init__(**kwargs)
  
      self.total_loss = tf.keras.metrics.Mean(name="t_loss")
      self.metrics_to_log = ["t_loss"]
  
      self._training = (
          None  # training phase should be defined when building a graph
      )
  
      if random_seed is None:
          random_seed = int(time.time())
      self.random_seed = random_seed
      self._set_random_seed()
  
      self._tf_predict_step: Optional["GenericFunction"] = None
      self.prepared_for_prediction = False
  
      self._checkpoint = tf.train.Checkpoint(model=self)
  
imports: import time
  import random
  import tensorflow
  import numpy
  import logging
  import os
  from collections import defaultdict
  from typing import List, Text, Dict, Tuple, Union, Optional, Any, TYPE_CHECKING
  from keras.utils import tf_utils
  from keras import Model
  from rasa.shared.constants import DIAGNOSTIC_DATA
  from rasa.utils.tensorflow.constants import LABEL, IDS, INTENT_CLASSIFICATION, SENTENCE, SEQUENCE_LENGTH, RANDOM_SEED, EMBEDDING_DIMENSION, REGULARIZATION_CONSTANT, SIMILARITY_TYPE, CONNECTION_DENSITY, NUM_NEG, LOSS_TYPE, MAX_POS_SIM, MAX_NEG_SIM, USE_MAX_NEG_SIM, NEGATIVE_MARGIN_SCALE, SCALE_LOSS, LEARNING_RATE, CONSTRAIN_SIMILARITIES, MODEL_CONFIDENCE, RUN_EAGERLY
  from rasa.utils.tensorflow.model_data import RasaModelData, FeatureSignature, FeatureArray
  import rasa.utils.train_utils
  from rasa.utils.tensorflow import layers
  from rasa.utils.tensorflow import rasa_layers
  from rasa.utils.tensorflow.data_generator import RasaDataGenerator, RasaBatchDataGenerator
  from rasa.shared.nlu.constants import TEXT
  from rasa.shared.exceptions import RasaException
  from rasa.utils.tensorflow.types import BatchData, MaybeNestedBatchData
label_desc: Use image node_id 1 to create a new RasaModel object from inherited base classes: Model with example: obj = RasaModel(random_seed)