Browse Source

fixed loading for training from scratch

Dimitri Korsch 4 years ago
parent
commit
5c4fd2a8ac
1 changed files with 3 additions and 0 deletions
  1. 3 0
      cvmodelz/classifiers/base.py

+ 3 - 0
cvmodelz/classifiers/base.py

@@ -77,6 +77,9 @@ class Classifier(chainer.Chain):
 
 	def load_classifier(self, weights_file: str):
 
+		if weights_file is None:
+			return
+
 		if isinstance(weights_file, io.BufferedIOBase):
 			assert not weights_file.closed, "The weights file was already closed!"
 			weights_file.seek(0)