mercredi 25 juillet 2018

How to add operation in tensorflow with Xcode

Recently, I am trying to learn how to add a new operation in tensorflow with Xcode for mac os. However, I do not find the tensorflow header file and I have installed tensorlfow with pip. I am not sure how to solve this problem. The following code is public in tensorlfow documentation.

#include "tensorflow/core/framework/op.h"
#include "tensorflow/core/framework/shape_inference.h"

using namespace tensorflow;

REGISTER_OP("ZeroOut")
    .Input("to_zero: int32")
    .Output("zeroed: int32")
    .SetShapeFn([](::tensorflow::shape_inference::InferenceContext* c) {
      c->set_output(0, c->input(0));
      return Status::OK();
    });

I just want to repeat it, but I can not find the path of tensorflow. Thank you so much, everybody!

Aucun commentaire:

Enregistrer un commentaire