class_docstr: The base class for text models in tfpark.
class_docstr_tok: ["The","base","class","for","text","models","in","tfpark","."]
code: def __init__(self, labor, optimizer=None, **kwargs):
      self.labor = labor
      self.labor.build(**kwargs)
      model = self.labor.model
      # Recompile the model if user uses a different optimizer other than the default one.
      if optimizer:
          model.compile(
              loss=model.loss,
              optimizer=optimizer,
              metrics=model.metrics,
          )
      super(TextKerasModel, self).__init__(model)
  
imports: from bigdl.orca.tfpark import KerasModel
label_desc: Use image node_id 1 to create a new TextKerasModel object from inherited base classes: KerasModel with example: obj = TextKerasModel(labor, optimizer)