Пример #1
0
def save_classifier(path, extractor, feature_computer, graph, session, saver):
    extractor_path = os.path.join(path, 'extractor')
    os.makedirs(extractor_path, exist_ok=True)
    extractor.save(extractor_path)

    feature_computer_path = os.path.join(path, 'feature_computer')
    os.makedirs(feature_computer_path, exist_ok=True)
    feature_computer.save(feature_computer_path)

    save_tf_model_with_saver(path, 'model', session, saver)
    save_with_pickle(_convert_save_graph(graph), path, "graph.pkl")
Пример #2
0
 def save(self, out_path):
     save_classifier(out_path, self.extractor, self.feature_computer, self.graph, self.session, self.saver)
     save_with_pickle(self.collapser, out_path, "collapser")
Пример #3
0
 def save(self, out_path):
     save_with_pickle(self, out_path, "feature_extractor.pkl")
Пример #4
0
 def save(self, out_path):
     save_classifier(out_path, self.extractor, self.feature_computer,
                     self.graph, self.session, self.saver)
     save_with_pickle(self.post_processor, out_path, "post_processor")
Пример #5
0
 def save(self, out_path):
     save_with_pickle(self, out_path, "feature_computer.pkl")
Пример #6
0
 def dump_docs(path: str, docs: List[Document], name: str):
     save_with_pickle(docs, path, name)
Пример #7
0
def dump(path: str, docs: list):
    save_with_pickle(docs, path, "docs.pkl")