docs: def write_desc(self) -> None:
          """ Writes a description of the model to the exp_dir. """
  
          path = os.path.join(self.exp_dir, "model_description.txt")
          with open(path, "w") as desc_f:
              for key, val in self.__dict__.items():
                  print("%s=%s" % (key, val), file=desc_f)
  
          import json
          json_path = os.path.join(self.exp_dir, "model_description.json")
          desc = { } #type: Dict[str, Any]
          # For use in decoding from a saved model
          desc["topology"] = {
              "batch_x_name" : self.batch_x.name, #type: ignore
              "batch_x_lens_name" : self.batch_x_lens.name, #type: ignore
              "dense_decoded_name" : self.dense_decoded.name #type: ignore
          }
          desc["model_type"] = str(self.__class__)
          for key, val in self.__dict__.items():
              if isinstance(val, int):
                  desc[str(key)] = val
              elif isinstance(val, tf.Tensor):
                  desc[key] = {
                      "type": "tf.Tensor",
                      "name": val.name, #type: ignore
                      "shape": str(val.shape), #type: ignore
                      "dtype" : str(val.dtype), #type: ignore
                      "value" : str(val),
                  }
              elif isinstance(val, tf.SparseTensor): #type: ignore
                  desc[key] = {
                      "type": "tf.SparseTensor",
                      "value": str(val), #type: ignore
                  }
              else:
                  desc[str(key)] = str(val)
          with open(json_path, "w") as json_desc_f:
              json.dump(desc, json_desc_f, skipkeys=True)