![]() ![]() In this case you can use the save_model_weights_tf function. When building more advanced models you may not be able to save the entire model using the save_model_tf function. You can download this file if you want to try the app. Note that to keep the code simple, it will only accept JPEG images with 28x28 pixels. ![]() You can see a live version of this app here. If you are deploying to RStudio Connect or Shinnyapps.io, don’t forget to set the RETICULATE_PYTHON environment variable so rsconnect can detect what python packages are required to reproduce your local environment. ![]() This app can be used locally or deployed using any Shiny deployment option. Library(shiny) library(keras) # Load the model model % array_reshape(., dim = c( 1, dim(.), 1)) paste0( "The predicted class number is ", predict_classes(model, img)) }) output $image <- renderPlot( shinyApp(ui, server) ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |