import tensorflow as tf

        **self.cnf.get('opt_kwargs', {'decay': 0.9}))
    # Get images and labels for ImageNet and split the batch across GPUs.
    assert self.cnf['batch_size_train'] % self.cnf.get('num_gpus', 1) == 0, (
        'Batch size must be divisible by number of GPUs')

    self.inputs = tf.placeholder(
        tf.float32,
        shape=(None, self.model.image_size[0], self.model.image_size[0], 3),
        name="input")
    self.labels = tf.placeholder(tf.int32, shape=(None,))

    self._tower_loss_semi_supervised(
        self.inputs, self.labels, num_classes=num_classes, is_fm_loss=True)

    global_update_ops = tf.get_collection(tf.GraphKeys.UPDATE_OPS)
    if update_ops is None:
      update_ops = global_update_ops
    else:
