I have a keras model with pretrained weights [h5df] of about 700mb. I would like to use it with Apache Spark as a broadcast variable. 1. This does not seem to be possible as the keras model itself is not spark aware and not serializable. 2. When googled it a little, I have found Elephas library that does the work. So tried wrapping up the Keras pretrained model in ElephasTransformer. This is throwing multiple errors as ( I use python 2.7 ). For example in the file ml_model.py of Elephas, "from pyspark.ml.util import keyword_only" , the import is not available. Even when I try to comment this out and make appropriate modifications in the code, it seems to be unable to handle the broadcasting of the keras model as it throws a tensor error in one of the dense layers.
How to use a pretrained keras model as a broadcast variable in apache spark ?