You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@madlib.apache.org by GitBox <gi...@apache.org> on 2021/03/02 11:52:59 UTC

[GitHub] [madlib] orhankislal commented on a change in pull request #534: DL: Various docs changes

orhankislal commented on a change in pull request #534:
URL: https://github.com/apache/madlib/pull/534#discussion_r585485332



##########
File path: src/ports/postgres/modules/deep_learning/keras_model_arch_table.sql_in
##########
@@ -42,16 +39,25 @@ Interface and implementation are subject to change. </em>
 <li class="level1"><a href="#related">Related Topics</a></li>
 </ul></div>
 
-This utility function loads model architectures and
+This function loads model architectures and
 weights into a table for use by deep learning algorithms.
+
 Model architecture is in JSON form
 and model weights are in the form of PostgreSQL binary data types (bytea).
 If the output table already exists, a new row is inserted
 into the table so it can act as a repository for multiple model
 architectures and weights.
 
-There is also a utility function to delete a model
-from the table.
+There is also a function to delete a model from the table.
+
+MADlib's deep learning methods are designed to use the TensorFlow package and its built in Keras
+functions.  To ensure consistency, please use tensorflow.keras objects (models, layers, etc.) 
+instead of importing Keras and using its objects.
+
+Please note that the first <em>n</em> layers of the model must have the shape

Review comment:
       To use multiple inputs, the model has to have the same number of input layers. 
   Example:
   ```
   input1 = Input(shape = (4,))
   input2 = Input(shape = (4,))
   dense1_1 = Dense(10, activation='relu', kernel_initializer=VarianceScaling(distribution="uniform"))(input1)
   dense2_1 = Dense(10, activation='relu', kernel_initializer=VarianceScaling(distribution="uniform"))(input2)
   concat = concatenate([dense1_1,dense2_1])
   ...
   ```
   In keras, it is possible to create an input layer without the input_shape; however, MADlib cannot work with those models and we have to let the user know that their model definition has to have this parameter. Note that this restriction was already in place, prior to the implementation of multi-io. 
   Please refer to the dev-check tests for a complete model example and model_arch_info.py_in line 28 for how this information is used.
   
   Here is my suggestion for the docs:
   ```
   Please note that every input layer has to have the `input_shape` stated explicitly during model creation. MADlib has this requirement because, in some cases, the JSON representation may not have the input shape by default and it has to be read from the JSON for fit() type functions.
   ```




----------------------------------------------------------------
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:
users@infra.apache.org