From d509aee67a8187ebe4ab2452103630003e6e97c8 Mon Sep 17 00:00:00 2001
From: Elie KHOURY <elie.khoury@idiap.ch>
Date: Fri, 3 Jul 2015 16:13:08 +0200
Subject: [PATCH] added an if statment before loading projector (bis)

---
 bob/bio/base/tools/algorithm.py | 3 ++-
 bob/bio/base/tools/scoring.py   | 3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/bob/bio/base/tools/algorithm.py b/bob/bio/base/tools/algorithm.py
index 9d2aabbb..86443e51 100644
--- a/bob/bio/base/tools/algorithm.py
+++ b/bob/bio/base/tools/algorithm.py
@@ -200,7 +200,8 @@ def enroll(algorithm, extractor, compute_zt_norm, indices = None, groups = ['dev
   # the file selector object
   fs = FileSelector.instance()
   # read the projector file, if needed
-  algorithm.load_projector(fs.projector_file)
+  if algorithm.requires_projector_training:  
+    algorithm.load_projector(fs.projector_file)
   # read the model enrollment file
   algorithm.load_enroller(fs.enroller_file)
 
diff --git a/bob/bio/base/tools/scoring.py b/bob/bio/base/tools/scoring.py
index dd2300c5..3d5a756c 100644
--- a/bob/bio/base/tools/scoring.py
+++ b/bob/bio/base/tools/scoring.py
@@ -246,7 +246,8 @@ def compute_scores(algorithm, compute_zt_norm, force = False, indices = None, gr
   fs = FileSelector.instance()
 
   # load the projector and the enroller, if needed
-  algorithm.load_projector(fs.projector_file)
+  if algorithm.requires_projector_training:  
+    algorithm.load_projector(fs.projector_file)
   algorithm.load_enroller(fs.enroller_file)
 
   for group in groups:
-- 
GitLab