code: def __init__(self, model, train_iter_func=None, eval_iter_func=None):
      self._model = model
      # self._serve_batch_size = serve_batch_size
      if not self._model.isbuilt():
          self._model.build()
  
      if train_iter_func is None:
          self._train_iter_func = self._default_train_iter_func
      else:
          self._train_iter_func = train_iter_func
  
      if eval_iter_func is None:
          self._eval_iter_func = self._default_eval_iter_func
      else:
          self._eval_iter_func = eval_iter_func
  
      self._trained_it = 0
  
file_path: openrec/openrec/tf1/model_trainer.py
imports: from __future__ import print_function
  from openrec.tf1.utils.evaluators import EvalManager
  from termcolor import colored
  import sys
  import numpy
label_desc: Use image node_id 1 to create a new ModelTrainer object from inherited base classes: object with example: obj = ModelTrainer(model, train_iter_func, eval_iter_func)