class_docstr: Estimator Class for easy model training
  
  :py:class:`Estimator` can be used to facilitate the training & validation process
  
  
  Parameters
  ----------
  net : gluon.Block
      The model used for training.
  loss : gluon.loss.Loss
      Loss (objective) function to calculate during training.
  train_metrics : EvalMetric or list of EvalMetric
      Training metrics for evaluating models on training dataset.
  val_metrics : EvalMetric or list of EvalMetric
      Validation metrics for evaluating models on validation dataset.
  initializer : Initializer
      Initializer to initialize the network.
  trainer : Trainer
      Trainer to apply optimizer on network parameters.
  device : Device or list of Device
      Device(s) to run the training on.
  val_net : gluon.Block
      The model used for validation. The validation model does not necessarily belong to
      the same model class as the training model. But the two models typically share the
      same architecture. Therefore the validation model can reuse parameters of the
      training model.
  
      The code example of consruction of val_net sharing the same network parameters as
      the training net is given below:
  
      >>> net = _get_train_network()
      >>> val_net = _get_test_network()
      >>> val_net.share_parameters(net.collect_params())
      >>> net.initialize(device=device)
      >>> est = Estimator(net, loss, val_net=val_net)
  
      Proper namespace match is required for weight sharing between two networks. Most networks
      inheriting :py:class:`Block` can share their parameters correctly. An exception is
      Sequential networks that Block scope must be specified for correct weight sharing. For
      the  naming in mxnet Gluon API, please refer to the site
      (https://mxnet.apache.org/api/python/docs/tutorials/packages/gluon/blocks/naming.html)
      for future information.
  val_loss : gluon.loss.loss
      Loss (objective) function to calculate during validation. If set val_loss
      None, it will use the same loss function as self.loss
  batch_processor: BatchProcessor
      BatchProcessor provides customized fit_batch() and evaluate_batch() methods
class_docstr_tok: ["Estimator","Class","for","easy","model","training",":","py",":","class",":","`","Estimator","`","can","be","used","to","facilitate","the","training","&","validation","process","Parameters","--","--","--","--","--","net",":","gluon.Block","The","model","used","for","training",".","loss",":","gluon.loss.Loss","Loss","(","objective",")","function","to","calculate","during","training",".","train_metrics",":","EvalMetric","or","list","of","EvalMetric","Training","metrics","for","evaluating","models","on","training","dataset",".","val_metrics",":","EvalMetric","or","list","of","EvalMetric","Validation","metrics","for","evaluating","models","on","validation","dataset",".","initializer",":","Initializer","Initializer","to","initialize","the","network",".","trainer",":","Trainer","Trainer","to","apply","optimizer","on","network","parameters",".","device",":","Device","or","list","of","Device","Device","(","s",")","to","run","the","training","on",".","val_net",":","gluon.Block","The","model","used","for","validation",".","The","validation","model","does","not","necessarily","belong","to","the","same","model","class","as","the","training","model",".","But","the","two","models","typically","share","the","same","architecture",".","Therefore","the","validation","model","can","reuse","parameters","of","the","training","model",".","The","code","example","of","consruction","of","val_net","sharing","the","same","network","parameters","as","the","training","net","is","given","below",":",">",">",">","net","=","_get_train_network","(",")",">",">",">","val_net","=","_get_test_network","(",")",">",">",">","val_net.share_parameters","(","net.collect_params","(",")",")",">",">",">","net.initialize","(","device=device",")",">",">",">","est","=","Estimator","(","net",",","loss",",","val_net=val_net",")","Proper","namespace","match","is","required","for","weight","sharing","between","two","networks",".","Most","networks","inheriting",":","py",":","class",":","`","Block","`","can","share","their","parameters","correctly",".","An","exception","is","Sequential","networks","that","Block","scope","must","be","specified","for","correct","weight","sharing",".","For","the","naming","in","mxnet","Gluon","API",",","please","refer","to","the","site","(","https",":","\/\/mxnet.apache.org\/api\/python\/docs\/tutorials\/packages\/gluon\/blocks\/naming.html",")","for","future","information",".","val_loss",":","gluon.loss.loss","Loss","(","objective",")","function","to","calculate","during","validation",".","If","set","val_loss","None",",","it","will","use","the","same","loss","function","as","self.loss","batch_processor",":","BatchProcessor","BatchProcessor","provides","customized","fit_batch","(",")","and","evaluate_batch","(",")","methods"]
code: def train_metrics(self):
      return self._train_metrics
  
imports: import copy
  import logging
  import sys
  import warnings
  from .event_handler import MetricHandler, ValidationHandler, LoggingHandler, StoppingHandler, GradientUpdateHandler
  from .event_handler import TrainBegin, EpochBegin, BatchBegin, BatchEnd, EpochEnd, TrainEnd
  from .event_handler import _check_event_handlers
  from .utils import _check_metrics, _suggest_metric_for_loss, _check_handler_metric_ref
  from ...data import DataLoader
  from ...loss import Loss
  from ...trainer import Trainer
  from ...utils import split_and_load
  from ....device import Device, cpu, gpu, num_gpus
  from ...metric import Loss
  from .batch_processor import BatchProcessor
label_desc: Use image node_id 12 for calling the Estimator obj's underlying member method code with example usage: obj.train_metrics() and returns: self