class_docstr: Estimators Graph is only build when fit/predict or evaluate is called.
      
class_docstr_tok: ["Estimators","Graph","is","only","build","when","fit\/predict","or","evaluate","is","called","."]
code: def __init__(
      self,
      metric=None,
      log_dir="/tmp/tflearn_logs/",
      global_step=None,
      session=None,
      graph=None,
      name=None,
  ):
      self.name = name
  
      # Estimator Graph and Session
      self.graph = tf.Graph() if graph is None else graph
      with self.graph.as_default():
          conf = tf.ConfigProto(allow_soft_placement=True)
          self.session = (
              tf.Session(config=conf) if session is None else session
          )
      if global_step is None:
          with self.graph.as_default():
              self.global_step = tf.train.get_or_create_global_step()
  
      self.metric = validate_func(metric)
  
      # Estimator Graph Branches
      self._train = GraphBranch()
      self._pred = GraphBranch()
      self._transform = GraphBranch()
      self._eval = GraphBranch()
  
      # Tensor Utils
      if not os.path.exists(log_dir):
          os.makedirs(log_dir)
      self.log_dir = log_dir
      self._is_initialized = False
      self._to_be_restored = False
  
      # Ops
      self.train_op = None
      self.loss_op = None
  
imports: from __future__ import division, print_function, absolute_import
  import os
  import tensorflow.compat.v1
  from tensorflow.python.ops import resources
  from ..utils import validate_func
label_desc: Use image node_id 1 to create a new BaseEstimator object from inherited base classes: object with example: obj = BaseEstimator(metric, log_dir, global_step, session, graph, name)