Explorar o código

fixed loading for training from scratch

Dimitri Korsch %!s(int64=4) %!d(string=hai) anos
pai
achega
5c4fd2a8ac
Modificáronse 1 ficheiros con 3 adicións e 0 borrados
  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)