Predict with keras models in R does not work on

In my Shiny app, I have a serialized keras model that I load with load_model_hdf5() . Then, I give it some data to make predictions for: my_model %>% predict(new_data) . It works perfectly locally, but when I try to deploy it on, the app crashes with the following error:

no applicable method for 'predict' applied to an object of class

This is indeed the list of classes that a keras R model has. Using methods() on all these classes shows that the training.Model one has a predict method.

The app used to work a few months ago, but now I have updated keras and tensorflow to the most recent versions (tf 2.0). Could this be the reason why it does not work at If not, what could be the reason?

What versions of the keras and tensorflow R packages are you using (output of rsconnect::appDependencies())?

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.