def __init__(self, model_name, model, type): self.path_data = '../data/' self.path_models = '../models/' self.path_logs = '../log/' self.type = type self.model_name = model_name if self.type == "d2v": self.model = load_model(self.path_models + self.model_name + "/", self.model_name + ".model", self.type) self.w2v = self.model.wv else: self.model = model self.w2v = self.model
def init_model(self): if self.type == "d2v": self.model = load_model(self.model_path, self.model_name, self.type)
def __init__(self, model, type): self.path_data = '../data/trainable/' self.path_models = '../models/' self.type = type self.model = load_model(self.path_models, model, self.type)
def __init__(self, model): self.model_path = '../models/' self.model_name = model self.model = load_model(self.model_path, self.model_name, 'w2v')
def __init__(self, model): self.path_data = '../data/' self.path_models = '../models/' self.model = load_model(self.path_models, model, 'd2v')