docstr: :param client_model: keras Model
  
  :param loss_fn: loss function. A function that calculate the absolute difference between our prediction and the actual value.
  
  :param optimizer_cls: optimizer class.
  
  :param optimizer_args: `dict` of hypterparamters that will be passed into `optimizer_cls`
  
  :param server_model: optional param to upload server_model
  
  :param client_model_path: optional string filepath to autosave client_model. Default None and will not auto save client_model.
  
  :param server_model_path: optional string filepath to autosave server_model. Default None and will not auto save server_model.
docstr_tok: [":","param","client_model",":","keras","Model",":","param","loss_fn",":","loss","function",".","A","function","that","calculate","the","absolute","difference","between","our","prediction","and","the","actual","value",".",":","param","optimizer_cls",":","optimizer","class",".",":","param","optimizer_args",":","`","dict","`","of","hypterparamters","that","will","be","passed","into","`","optimizer_cls","`",":","param","server_model",":","optional","param","to","upload","server_model",":","param","client_model_path",":","optional","string","filepath","to","autosave","client_model",".","Default","None","and","will","not","auto","save","client_model",".",":","param","server_model_path",":","optional","string","filepath","to","autosave","server_model",".","Default","None","and","will","not","auto","save","server_model","."]
code: def from_keras(
      client_model: Model,
      loss_fn,
      optimizer_cls,
      optimizer_args={},
      server_model=None,
      client_model_path=None,
      server_model_path=None,
  ):
      """
      :param client_model: keras Model
  
      :param loss_fn: loss function. A function that calculate the absolute difference between our prediction and the actual value.
  
      :param optimizer_cls: optimizer class.
  
      :param optimizer_args: `dict` of hypterparamters that will be passed into `optimizer_cls`
  
      :param server_model: optional param to upload server_model
  
      :param client_model_path: optional string filepath to autosave client_model. Default None and will not auto save client_model.
  
      :param server_model_path: optional string filepath to autosave server_model. Default None and will not auto save server_model.
      """
      estimator = TensorflowEstimator(
          model=client_model,
          loss_fn=loss_fn,
          optimizer_cls=optimizer_cls,
          optimizer_args=optimizer_args,
          server_model=server_model,
          client_model_path=client_model_path,
          server_model_path=server_model_path,
      )
      return estimator
  
file_path: BigDL/python/ppml/src/bigdl/ppml/fl/estimator.py
imports: import imp
  import logging
  from numpy import ndarray
  import torch
  from torch import nn
  from bigdl.ppml.fl.nn.pytorch.estimator import PytorchEstimator
  from torch.utils.data import DataLoader
  from bigdl.dllib.utils.log4Error import invalidInputError
  from bigdl.ppml.fl.nn.tensorflow.estimator import TensorflowEstimator
  from bigdl.ppml.fl.nn.utils import tensor_map_to_ndarray_map
  from tensorflow.keras.models import Model
label_desc: Use image node_id 2 for calling the Estimator obj's underlying member method code with example usage: obj.from_keras(client_model, loss_fn, optimizer_cls, optimizer_args, server_model, client_model_path, server_model_path) and returns: estimator