Skip to content

Commit

Permalink
rm call to private Model._make_predict_function
Browse files Browse the repository at this point in the history
Discussions on why it isn't recommended to call:

* keras-team/keras#6124
* keras-team/keras#13116
  • Loading branch information
Miha Jenko committed May 5, 2020
1 parent 4121bd4 commit fae6a90
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions ivis/ivis.py
Original file line number Diff line number Diff line change
Expand Up @@ -398,11 +398,11 @@ def load_model(self, folder_path):
self.__dict__ = ivis_config

loss_function = triplet_loss(self.distance, self.margin)
self.model_ = load_model(os.path.join(folder_path, 'ivis_model.h5'),
custom_objects={'tf': tf,
loss_function.__name__: loss_function })
self.model_: Model = load_model(
os.path.join(folder_path, 'ivis_model.h5'),
custom_objects={'tf': tf, loss_function.__name__: loss_function}
)
self.encoder = self.model_.layers[3]
self.encoder._make_predict_function()

# If a supervised model exists, load it
supervised_path = os.path.join(folder_path, 'supervised_model.h5')
Expand Down

0 comments on commit fae6a90

Please sign in to comment.