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")
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")
def save(self, out_path): save_with_pickle(self, out_path, "feature_extractor.pkl")
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")
def save(self, out_path): save_with_pickle(self, out_path, "feature_computer.pkl")
def dump_docs(path: str, docs: List[Document], name: str): save_with_pickle(docs, path, name)
def dump(path: str, docs: list): save_with_pickle(docs, path, "docs.pkl")