Using something like the following lines to convert preprocessing and ANN models to C
import pickle
import scikinC
from tensorflow import keras
from sklearn.pipeline import Pipeline
with open("/path/to/tX.pkl", "rb") as file:
x_scaler = pickle.load(file) # for example, a sklearn QuantileTransformer
model = keras.models.load_model("/path/to/saved_model")
pipe = Pipeline([("tX", x_scaler), ("dnn", model)])
deploy = {"pipe": pipe}
c_fname = "pipe.C"
print(scikinC.convert(deploy, float_t="double"), file=open(f"/path/to/{c_fname}", "w"))
prevents the conversion of the sklearn x_scaler and keras model to receive correctly the --double flag passed to scikinC.
The flag is used as expected only by the sklearn pipe.
Using something like the following lines to convert preprocessing and ANN models to C
prevents the conversion of the sklearn
x_scalerand kerasmodelto receive correctly the--doubleflag passed to scikinC.The flag is used as expected only by the sklearn
pipe.