code: def load_model(cls, model_path: str) -> "Seq2Seq":
      from kashgari.utils import load_data_object
  
      model_config_path = os.path.join(model_path, "model_config.json")
      model_config = json.loads(open(model_config_path, "r").read())
      model = load_data_object(model_config)
  
      # Load processors and embeddings
      model.encoder_processor = load_data_object(
          model_config["encoder_processor"]
      )
      model.decoder_processor = load_data_object(
          model_config["decoder_processor"]
      )
      model.encoder_embedding = load_data_object(
          model_config["encoder_embedding"]
      )
      model.decoder_embedding = load_data_object(
          model_config["decoder_embedding"]
      )
  
      model._build_encoder_decoder()
      # Load Model Weights
      model.encoder_embedding.embed_model.load_weights(
          os.path.join(model_path, "encoder_embed_weights.h5")
      )
      model.decoder_embedding.embed_model.load_weights(
          os.path.join(model_path, "decoder_embed_weights.h5")
      )
  
      # ------ Fix Start -------
      # load model issue on TF 2.3
      # Unable to load weights saved in HDF5 format into a subclassed Model which has not created its variables yet.
      # Call the Model first, then load the weights.
      input_seq = model.encoder_processor.transform(
          [["hello"]], seq_length=model.encoder_seq_length
      )
      dec_input = tf.expand_dims([3], 0)
      enc_hidden = tf.zeros((1, model.hidden_size))
      dec_hidden = enc_hidden
      enc_output, enc_hidden = model.encoder(input_seq, enc_hidden)
      _ = model.decoder(dec_input, dec_hidden, enc_output)
      # ------ Fix End -------
  
      model.encoder.load_weights(
          os.path.join(model_path, "encoder_weights.h5")
      )
      model.decoder.load_weights(
          os.path.join(model_path, "decoder_weights.h5")
      )
  
      return model
  
imports: import json
  import os
  import pathlib
  from typing import Any, Tuple, List, Dict
  import numpy
  import tensorflow
  import tqdm
  import kashgari
  from kashgari.embeddings import BareEmbedding
  from kashgari.embeddings.abc_embedding import ABCEmbedding
  from kashgari.generators import CorpusGenerator, Seq2SeqDataSet
  from kashgari.logger import logger
  from kashgari.processors import SequenceProcessor
  from kashgari.tasks.seq2seq.decoder import AttGRUDecoder
  from kashgari.tasks.seq2seq.encoder import GRUEncoder
  from kashgari.types import TextSamplesVar
label_desc: Use image node_id 10 for calling the Seq2Seq obj's underlying member method code with example usage: obj.load_model(cls, model_path) and returns: model