Search code examples
python-3.xperformancemachine-learningpredicttensorflow2.x

Is there any way to speed up the predicting process for tensorflow lattice?


I build my own model with Keras Premade Models in tensorflow lattice using python3.7 and save the trained model. However, when I use the trained model for predicting, the speed of predicting each data point is at millisecond level, which seems very slow. Is there any way to speed up the predicting process for tfl?


Solution

  • There are multiple ways to improve speed, but they may involve a tradeoff with prediction accuracy. I think the three most promising options are:

    • Reduce the number of features
    • Reduce the number of lattices per feature
    • Use an ensemble of lattice models where every lattice model only gets a subsets of the features and then average the predictions of the different models (like described here)