Esempio n. 1
0
 def prepModel(self, test_samples_tokens_pad):
     with CustomObjectScope({'Attention': Attention}):
         new_model = GetDatasetPath(self.model, choice=self.choice).loadModel()
     predictions = new_model.predict(test_samples_tokens_pad)
     return predictions
Esempio n. 2
0
 def prepModel(self):
     with CustomObjectScope({'Attention': Attention}):
         new_model = GetDatasetPath(MODEL['fasttext'],
                                    choice='imdb').loadModel()
     self.predictions = new_model.predict(self.test_samples_tokens_pad)