Skip to content

Commit 2ca4e01

Browse files
committed
Fix scoring with loaded model
1 parent 7a0bfcb commit 2ca4e01

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

cpa/classifier.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1256,6 +1256,10 @@ def LoadModel(self, filename):
12561256
bin.trained = True
12571257
self.scoreAllBtn.Enable()
12581258
self.scoreImageBtn.Enable()
1259+
# Create an empty training set as a placeholder.
1260+
self.trainingSet = TrainingSet(p)
1261+
self.trainingSet.Create([bin.label for bin in self.classBins],
1262+
[[] for _ in self.classBins])
12591263
self.algorithm.trained = True
12601264
self.PostMessage('Classifier model successfully loaded')
12611265

0 commit comments

Comments
 (0)