AOT compilation of an Estimator

69 views Asked by At

I find it very challenging to find in the documentation any help on this important issue.. Indeed, after creating an estimator (canned or custom), one wants to tf.compile the resulting predictor, produce the .so and link it to one's project..

So I have my calib class in which I define a simple linear estimator

self.model = tf.estimator.LinearRegressor(
        feature_columns=self.feature_columns,
        model_dir = self.model_dir)

After training, I want to 1- get the trained model with optimal parameters (load it in my variable self.model)

2- extract the graph and freeze it

3- tf.compile that graph

I could not find any way to do parts 1- and 2-. Once I have them, part 3 is solved by using tf.compile

Can you please point me to a good way to it?

1

There are 1 answers

0
volatile On

This helped a lot. It may help anyone passing by here