Пример #1
0
    def __init__(self):
        self.feature_encoder = load_obj(model_path, "feature_encoder")
        self.trained_model = load_obj(model_path, "rf_recommender")
        self.user_data = self.load_user_data()

        self.movie_lookup = self.load_movie_names()
        self.movie_ids = list(self.movie_lookup.keys())
        self.c = metric.MetricClient()
Пример #2
0
 def __init__(self):
     model_parameters = load_obj(model_path, "model_parameters")
     self.trained_model = CFModel(model_parameters["max_userid"],
                                  model_parameters["max_movieid"],
                                  model_parameters["k_factors"])
     self.trained_model.load_weights(os.path.join(model_path, 'weights.h5'))
     self.trained_model._make_predict_function()
     self.class_names = ["class:rating"]
     self.movie_lookup = self.load_movie_names()
     self.movie_ids = list(self.movie_lookup.keys())
     self.c = metric.MetricClient()
Пример #3
0
 def __init__(self):
     self.sess = tf.Session()
     saver = tf.train.import_meta_graph(
         os.path.join(model_path, "model.ckpt.meta"))
     saver.restore(self.sess, os.path.join(model_path, "model.ckpt"))
     self.c = metric.MetricClient()
Пример #4
0
 def __init__(self):
     self.model = pickle.load(open(model_path + "lr.pkl", 'rb'))
     self.c = metric.MetricClient()
Пример #5
0
 def __init__(self):
     self.model = load(os.path.join(model_path, 'sk.pkl'))
     self.c = metric.MetricClient()
Пример #6
0
 def __init__(self):
     self.sess = GPT2Generator.start_tf_sess()
     self.load_gpt2(self.sess)
     self.c = metric.MetricClient()
Пример #7
0
	def __init__(self):
		self.model = keras.models.load_model(os.path.join(model_path, "saved_models/keras_cifar10_trained_model.h5"))
		self.c = metric.MetricClient()