You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello there,
first thanks for providing this nice add on for tensorflow:) However I am unable to build the code sippet from the tensorflow c++ API introduction with it...Here is my codesnippet:
#include "tensorflow/core/public/session.h"
#include "tensorflow/core/platform/env.h"
#include "tensorflow/cc/client/client_session.h"
#include "tensorflow/cc/ops/standard_ops.h"
#include "tensorflow/core/framework/tensor.h"
int main(int argc, char** argv )
{
namespace tf = tensorflow;
tf::Scope root = tf::Scope::NewRootScope();
// Matrix A = [3 2; -1 0]
auto A = tf::ops::Const(root, { {3.f, 2.f}, {-1.f, 0.f}});
// Vector b = [3 5]
auto b = tf::ops::Const(root, { {3.f, 5.f}});
// v = Ab^T
auto v = tf::ops::MatMul(root.WithOpName("v"), A, b, tf::ops::MatMul::TransposeB(true));
std::vector<tf::Tensor> outputs;
tf::ClientSession session(root);
// Run and fetch v
//TF_CHECK_OK(session.Run({v}, &outputs));
session.Run({v}, &outputs);
// Expect outputs[0] == [19; -3]
LOG(INFO) << outputs[0].matrix<float>();
return 0;
}
And the error messages I get at compiling: undefined reference to tensorflow::ClientSession::ClientSession(tensorflow::Scope const&) undefined reference to tensorflow::ClientSession::Run(std::vector<tensorflow::Output, std::allocator<tensorflow::Output> > const&, std::vector<tensorflow::Tensor, std::allocator<tensorflow::Tensor> >*) const' undefined reference to tensorflow::ClientSession::~ClientSession()' undefined reference to tensorflow::ClientSession::~ClientSession()'
Is it possible that this has something to do with the cmake-inclusion or do you think its a problem with my tensorflow installation? I only have this problem with the ClientSession, if a run a "normal" Session I don't get any errors...
The text was updated successfully, but these errors were encountered:
Hello, this was actually an issue with this repository; I had neglected to include some dependencies in the added build rule. I have updated the README with a revised rule, and your code now works using the latest version of TensorFlow. Please let me know if this works for you.
Hello there,
first thanks for providing this nice add on for tensorflow:) However I am unable to build the code sippet from the tensorflow c++ API introduction with it...Here is my codesnippet:
And the error messages I get at compiling:
undefined reference to tensorflow::ClientSession::ClientSession(tensorflow::Scope const&)
undefined reference to tensorflow::ClientSession::Run(std::vector<tensorflow::Output, std::allocator<tensorflow::Output> > const&, std::vector<tensorflow::Tensor, std::allocator<tensorflow::Tensor> >*) const'
undefined reference to tensorflow::ClientSession::~ClientSession()'
undefined reference to tensorflow::ClientSession::~ClientSession()'
Is it possible that this has something to do with the cmake-inclusion or do you think its a problem with my tensorflow installation? I only have this problem with the ClientSession, if a run a "normal" Session I don't get any errors...
The text was updated successfully, but these errors were encountered: