import tensorflow as tf

      config = tf.ConfigProto()
      if FLAGS.enbl_multi_gpu:
        config.gpu_options.visible_device_list = str(mgw.local_rank())  # pylint: disable=no-member
      else:
        config.gpu_options.visible_device_list = '0'  # pylint: disable=no-member
      sess = tf.Session(config=config)

      # data input pipeline
      with tf.variable_scope(self.data_scope):
        iterator = self.build_dataset_train()
