0

I have built a model using using tensorforest in sklow along with the following model files

  1. checkpoint
  2. graph.pbtxt
  3. model.ckpt-1.meta
  4. model.ckpt-1-00000-of-00001
  5. events.out.tfevents.1495890133.COGCONSs-MacBook-Pro.local

Could anyone tell me how to write a code to freeze and sklow model?Do I have to use placeholders like its done in tensorflow or is it different for skflow? Here is the code

    y_train = pd.factorize(df_train['data.0.sleeping'])[0]
    y_test = pd.factorize(df_test['data.0.sleeping'])[0]
    df_test=df_test.iloc[:, :-1]
    print(df_test.head(3))
    hparams = tf.contrib.tensor_forest.python.tensor_forest.ForestHParams(
             num_trees=3, max_nodes=1000, num_classes=2, num_features=4)
    clf = tf.contrib.learn.TensorForestEstimator(hparams, model_dir='model/')
    clf.fit(x=df_train[features], y=y_train,steps=100)
  • I'd use `estimator.export_savedmodel`, which will bundle the variables with the meta-graph and allow you to choose an `input_fn` for serving. More details toward the end of this thread: https://github.com/tensorflow/serving/issues/228 – Allen Lavoie Jun 01 '17 at 16:24
  • Hi, Allen. It is still not clear from the thread.Can you guide me more on this.I have the pbtxt file, just need to create the pb file somehow.Thanks in advance – Md Zain Ahmed Aug 07 '17 at 13:03
  • What are you planning to do with the frozen model, and which version of TensorFlow? I can do an example of exporting in Saved Model format, just want to make sure that's useful here. – Allen Lavoie Aug 14 '17 at 19:17

0 Answers0