pplonski / keras2cpp

This is a bunch of code to port Keras neural network model into pure C++.
MIT License
679 stars 153 forks source link

simpler c++ code #42

Closed rspadim closed 5 years ago

rspadim commented 5 years ago

Hi guys, could we create a simpler c++ code?

maybe a plain C code and avoid external libs and file read

my idea is a fixed code with hardcoded parameters values, and only predicting "one row", no batch prediction and no GPU support, something very very simple

if possible don't use vector<> just use fixed arrays, something like treelite do with xgboost

only one function to predict + inline functions to activation functions sigmoid, relu, conv, etc:

double predict(double *data){ }

data is an array of input "features"

pplonski commented 5 years ago

Nice idea, go ahead!