'Load.
Restore model weights.
Arguments:
model_file: `str`. Model path.
weights_only: `bool`. If True, only weights will be restored (
and not intermediate variable, such as step counter, moving
averages...). Note that if you are using batch normalization,
averages will not be restored as well.
optargs: optional extra arguments for trainer.restore (see helpers/trainer.py)
These optional arguments may be used to limit the scope of
variables restored, and to control whether a new session is
created for the restored variables.'

def load(self, model_file, weights_only=False, **optargs):

    self.trainer.restore(model_file, weights_only, **optargs)
    self.session = self.trainer.session
    self.predictor = Evaluator([self.net], session=self.session, model=None)
    for d in tf.get_collection(tf.GraphKeys.DATA_PREP):
        if d:
            d.restore_params(self.session)
