reductionista opened a new pull request #356: Keras model arch table helper functions for keras_fit() URL: https://github.com/apache/madlib/pull/356 This PR introduces two new helper functions, `load_keras_model()` and `delete_keras_model()`. It is a part of the new deep learning functionality being added to madlib. These functions will help prepare the input to the `keras_fit()` function being introduced in PR [#355](https://github.com/apache/madlib/pull/355). `keras_fit()` takes a model_arch_table param and a model_id param. This refers to a row in a "keras model arch table" which has to have a particular format. These functions will help the user to create and manage that table, without worrying about the details of the format. Each row of the keras model arch table represents a keras model architecture, and is identified by a model_id. `load_keras_model()` will add a new model architecture to the table, creating the table if it doesn't exist and then inserting the appropriate row into it. The newly assigned model_id will be printed for the user, who can then pass that as the model_id parameter to `keras_fit()`. The model architectures themselves are expected to be in JSON format, which can be achieved by calling `model.to_json()` on any keras model after it is created (in python). The keras model arch table also has a column to store weights. This is initialized to `null` by `load_keras_model()` but we plan to add another helper function in the near future to be able to set the weights (useful for doing a warm start, instead of letting keras randomly initialize the weights when training begins). The keras model arch table itself will be automatically dropped by `delete_keras_model()` after all of the models in it are deleted and the table is empty. To help avoid mistakes, if either of these functions is run on a table that doesn't match the expected format, and exception will be thrown and the table will be left untouched.
---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services
