docstr: :param estimator: a tf.estimator.Estimator, in the estimator's model_fn,
  ZooOptimizer must be used and only ZooOptimizer should be used to derive
  the train_op.
docstr_tok: [":","param","estimator",":","a","tf.estimator.Estimator",",","in","the","estimator","'s","model_fn",",","ZooOptimizer","must","be","used","and","only","ZooOptimizer","should","be","used","to","derive","the","train_op","."]
code: def __init__(self, estimator):
      """
      :param estimator: a tf.estimator.Estimator, in the estimator's model_fn,
      ZooOptimizer must be used and only ZooOptimizer should be used to derive
      the train_op.
      """
  
      self.estimator = estimator
      self._model_fn = self.estimator.model_fn
      self._model_dir = self.estimator.model_dir
      self.config = self.estimator.config
      self.params = self.estimator.params
      self.tf_optimizer = None
  
file_path: analytics-zoo/pyzoo/zoo/tfpark/estimator.py
imports: from bigdl.optim.optimizer import MaxIteration, Loss, TreeNNAccuracy
  from zoo.tfpark.utils import evaluate_string_metrics
  from zoo.pipeline.api.keras import metrics
  from zoo.tfpark.tfnet import TFNet
  from zoo.tfpark.tf_optimizer import TFOptimizer
  from zoo.tfpark.tf_dataset import TFDataset
  from zoo.util import nest
  import six
  import os
label_desc: Use image node_id 1 to create a new TFEstimator object from inherited base classes: object with example: obj = TFEstimator(estimator)