コード例 #1
0
ファイル: classification.py プロジェクト: INTER-ACT/ilai
 def load(self, path):
     path += self.file_extension
     if not os.path.isfile(path):
         raise LoadModelException(
             "Loading model failed. File {} not found.".format(path))
     try:
         self.clf = joblib.load(path)
     except OSError as e:
         raise LoadModelException(
             'Loading model from {} failed'.format(path)) from e
コード例 #2
0
ファイル: classification.py プロジェクト: INTER-ACT/ilai
 def load(self, path):
     path += self.file_extension
     if not os.path.isfile(path):
         raise LoadModelException(
             "Loading model failed. File {} not found.".format(path))
     with self.tf_graph.as_default():
         try:
             self.model = keras.models.load_model(path)
         except OSError as e:
             raise LoadModelException(
                 'Loading model from {} failed'.format(path)) from e
コード例 #3
0
ファイル: abstract_models.py プロジェクト: INTER-ACT/ilai
 def check_load(self, path):
     path += self.file_extension
     if not os.path.isfile(path):
         raise LoadModelException(
             "Loading model failed. File {} not found.".format(path))