New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

graph.pb.h missing #1890

Closed
SanderDalm opened this Issue Apr 12, 2016 · 31 comments

Comments

Projects
None yet
@SanderDalm

SanderDalm commented Apr 12, 2016

The issue is quite simple: I downloaded and built TF from source, but the include files like tensorflow/core/public/session.h reference non-existing files. One culprit is tensorflow/core/framework/graph.pb.h. Attempted compilation produces the following error:

22:31:27 **** Build of configuration Debug for project hello_world ****
make all
make: Warning: File `objects.mk' has modification time 1,8e+02 s in the future
Building file: ../src/hello_world.cpp
Invoking: GCC C++ Compiler
g++ -I/home/sander/tensorflow -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"src/hello_world.d" -MT"src/hello_world.d" -o "src/hello_world.o" "../src/hello_world.cpp"
In file included from ../src/hello_world.cpp:8:0:
/home/sander/tensorflow/tensorflow/core/public/session.h:22:48: fatal error: tensorflow/core/framework/graph.pb.h: No such file or directory
#include "tensorflow/core/framework/graph.pb.h"
^
compilation terminated.

I cannot rule out a mistake on my part, but I've tried a bunch of things to no avail. Either a file is missing or there may be a linking issue. Any help would be greatly appreciated.

Environment info

Operating System: Ubuntu 14.04

Installed version of CUDA and cuDNN:
None

If installed from binary pip package, provide:

  1. Which pip package you installed.
    I followed these steps:

1 git clone --recurse-submodules https://github.com/tensorflow/tensorflow

2 run ./configure

3 bazel build -c opt //tensorflow/tools/pip_package:build_pip_package

4 bazel-bin/tensorflow/tools/pip_package/build_pip_package /tmp/tensorflow_pkg

5 pip install /tmp/tensorflow_pkg/tensorflow-0.7.1-py2-none-linux_x86_64.whl

  1. The output from python -c "import tensorflow; print(tensorflow.version)".
    0.7.1

If installed from sources, provide the commit hash:
not sure, retrieved on 11 april from terminal:
$ git clone --recurse-submodules https://github.com/tensorflow/tensorflow

Steps to reproduce

  1. The error occurs simply when any file from TF is included in c++
    example:
    #include "tensorflow/core/public/session.h"

What have you tried?

  1. Reinstall/upgrade: pip, bazel, tensorflow, gcc/g++, add additional include paths

Logs or other output that would be helpful

(If logs are large, please upload as attachment).

@mrry

This comment has been minimized.

Show comment
Hide comment
@mrry

mrry Apr 13, 2016

Contributor

tensorflow/core/framework/graph.pb.h is a generated file: it should be produced in the bazel-genfiles/tensorflow/core/framework directory when you build TensorFlow using Bazel.

Building from source without using Bazel is not fully supported right now, but you could try adding -I/home/sander/tensorflow/bazel-genfiles to your g++ arguments (assuming you have previously build TF from source).

Contributor

mrry commented Apr 13, 2016

tensorflow/core/framework/graph.pb.h is a generated file: it should be produced in the bazel-genfiles/tensorflow/core/framework directory when you build TensorFlow using Bazel.

Building from source without using Bazel is not fully supported right now, but you could try adding -I/home/sander/tensorflow/bazel-genfiles to your g++ arguments (assuming you have previously build TF from source).

@SanderDalm

This comment has been minimized.

Show comment
Hide comment
@SanderDalm

SanderDalm Apr 13, 2016

Thank you for your answer. In genfiles I finally found the missing file. Should I add genfiles to my include paths?

SanderDalm commented Apr 13, 2016

Thank you for your answer. In genfiles I finally found the missing file. Should I add genfiles to my include paths?

@mrry

This comment has been minimized.

Show comment
Hide comment
@mrry

mrry Apr 13, 2016

Contributor

That should work, although the recommend workflow is still to use Bazel for building C++ targets (since it takes care of these issues).

Contributor

mrry commented Apr 13, 2016

That should work, although the recommend workflow is still to use Bazel for building C++ targets (since it takes care of these issues).

@SanderDalm

This comment has been minimized.

Show comment
Hide comment
@SanderDalm

SanderDalm Apr 13, 2016

Ah, but the thing is, I did use bazel to build it. I used the bazel commands as shown on the TF installation page. I wonder if something else is wrong... Do you have any idea what could be the issue?

SanderDalm commented Apr 13, 2016

Ah, but the thing is, I did use bazel to build it. I used the bazel commands as shown on the TF installation page. I wonder if something else is wrong... Do you have any idea what could be the issue?

@mrry

This comment has been minimized.

Show comment
Hide comment
@mrry

mrry Apr 14, 2016

Contributor

I mean that it would be easier to build your own program hello_world.cpp using Bazel as well. From your error message it looks like you are using make all to build it, which is unsupported, but you might be able to set up your include path appropriately.

Contributor

mrry commented Apr 14, 2016

I mean that it would be easier to build your own program hello_world.cpp using Bazel as well. From your error message it looks like you are using make all to build it, which is unsupported, but you might be able to set up your include path appropriately.

@SanderDalm

This comment has been minimized.

Show comment
Hide comment
@SanderDalm

SanderDalm Apr 14, 2016

Wow, I finally get my mistake. I built TF using bazel, but then tried to build my program in Eclipse. Thanks a lot!

As a last little question, do you know any link/tutorial on building your own project in bazel?

SanderDalm commented Apr 14, 2016

Wow, I finally get my mistake. I built TF using bazel, but then tried to build my program in Eclipse. Thanks a lot!

As a last little question, do you know any link/tutorial on building your own project in bazel?

@mrry

This comment has been minimized.

Show comment
Hide comment
@mrry

mrry Apr 14, 2016

Contributor

Ah, that makes sense! The Bazel C++ tutorial covers all of the concepts that you need to know, although for simple projects you might get just as far by copying the rule for one of the TensorFlow C++ binaries (e.g.).

Contributor

mrry commented Apr 14, 2016

Ah, that makes sense! The Bazel C++ tutorial covers all of the concepts that you need to know, although for simple projects you might get just as far by copying the rule for one of the TensorFlow C++ binaries (e.g.).

@mrry mrry closed this Apr 14, 2016

@HossamAmer12

This comment has been minimized.

Show comment
Hide comment
@HossamAmer12

HossamAmer12 Feb 23, 2017

@SanderDalm After you created the bazel-gen files, what did you do for your application to build? Did you add the bazel-gen files in your include path? Did it work after that? How did you avoid rebuilding TF again?

I have a C++ project that contains several subfolders of *.h and *.cpp files. I think that creating a BUILD file for such a project will not be the fastest way to solve the issue.
@mrry

HossamAmer12 commented Feb 23, 2017

@SanderDalm After you created the bazel-gen files, what did you do for your application to build? Did you add the bazel-gen files in your include path? Did it work after that? How did you avoid rebuilding TF again?

I have a C++ project that contains several subfolders of *.h and *.cpp files. I think that creating a BUILD file for such a project will not be the fastest way to solve the issue.
@mrry

@YorksonChang

This comment has been minimized.

Show comment
Hide comment
@YorksonChang

YorksonChang Apr 20, 2017

@SanderDalm @HossamAmer12
I have the same question ,too.
I would like to add the code for prediction to my cv project,
I used Bazel build: to create a libtensorflow.so file,
then I add it in the lib path,
but it dose not work.
Because the IDE always remind me that many include files are not found.
I use Max OS X, QtCreator, gcc.

YorksonChang commented Apr 20, 2017

@SanderDalm @HossamAmer12
I have the same question ,too.
I would like to add the code for prediction to my cv project,
I used Bazel build: to create a libtensorflow.so file,
then I add it in the lib path,
but it dose not work.
Because the IDE always remind me that many include files are not found.
I use Max OS X, QtCreator, gcc.

@HossamAmer12

This comment has been minimized.

Show comment
Hide comment
@HossamAmer12

HossamAmer12 Apr 20, 2017

@SanderDalm @YorksonChang @mrry

This is a simple Neural Network I created using C++ Tensorflow. I also created a makefile for compiling the source code via (g++); I think that this makefile will be helpful for you to understand how to build the code.
simpleNetwork.zip

Because I inserted absolute paths, you need to insert your own paths in the makefile.

Best of luck and let me know if you have more questions!

PS: I extended the following tutorial:
https://medium.com/jim-fleming/loading-a-tensorflow-graph-with-the-c-api-4caaff88463f

HossamAmer12 commented Apr 20, 2017

@SanderDalm @YorksonChang @mrry

This is a simple Neural Network I created using C++ Tensorflow. I also created a makefile for compiling the source code via (g++); I think that this makefile will be helpful for you to understand how to build the code.
simpleNetwork.zip

Because I inserted absolute paths, you need to insert your own paths in the makefile.

Best of luck and let me know if you have more questions!

PS: I extended the following tutorial:
https://medium.com/jim-fleming/loading-a-tensorflow-graph-with-the-c-api-4caaff88463f

@lababidi

This comment has been minimized.

Show comment
Hide comment
@lababidi

lababidi May 10, 2017

@HossamAmer12 Thank you for sharing your project. There's a key step I'm failing to accomplish. When I run your code (or my code) the header files are not found. How do you resolve this?

lababidi commented May 10, 2017

@HossamAmer12 Thank you for sharing your project. There's a key step I'm failing to accomplish. When I run your code (or my code) the header files are not found. How do you resolve this?

@lababidi

This comment has been minimized.

Show comment
Hide comment
@lababidi

lababidi May 10, 2017

Thanks to @HossamAmer12 for providing a zip of his work, deriving from the Medium article example, I have the follow:

First, after installing protobuf and eigen:

./configure
bazel build  //tensorflow:libtensorflow_cc.so

Then Copy the following include headers and dynamic shared library to /usr/local/lib and /usr/local/include:

mkdir /usr/local/include/tf
cp -r bazel-genfiles/ /usr/local/include/tf/
cp -r tensorflow /usr/local/include/tf/
cp -r third_party /usr/local/include/tf/
cp -r bazel-bin/libtensorflow_cc.so /usr/local/lib/

Lastly, compile using an example:

g++ -std=c++11 -o tLoader -I/usr/local/include/tf -I/usr/local/include/eigen3 -g -Wall -D_DEBUG -Wshadow -Wno-sign-compare -w  -L/usr/local/lib/libtensorflow_cc `pkg-config --cflags --libs protobuf`  -ltensorflow_cc loader.cpp

lababidi commented May 10, 2017

Thanks to @HossamAmer12 for providing a zip of his work, deriving from the Medium article example, I have the follow:

First, after installing protobuf and eigen:

./configure
bazel build  //tensorflow:libtensorflow_cc.so

Then Copy the following include headers and dynamic shared library to /usr/local/lib and /usr/local/include:

mkdir /usr/local/include/tf
cp -r bazel-genfiles/ /usr/local/include/tf/
cp -r tensorflow /usr/local/include/tf/
cp -r third_party /usr/local/include/tf/
cp -r bazel-bin/libtensorflow_cc.so /usr/local/lib/

Lastly, compile using an example:

g++ -std=c++11 -o tLoader -I/usr/local/include/tf -I/usr/local/include/eigen3 -g -Wall -D_DEBUG -Wshadow -Wno-sign-compare -w  -L/usr/local/lib/libtensorflow_cc `pkg-config --cflags --libs protobuf`  -ltensorflow_cc loader.cpp
@HossamAmer12

This comment has been minimized.

Show comment
Hide comment
@HossamAmer12

HossamAmer12 May 11, 2017

@lababidi Is the issue still open?

HossamAmer12 commented May 11, 2017

@lababidi Is the issue still open?

@freesouls

This comment has been minimized.

Show comment
Hide comment
@freesouls

freesouls May 15, 2017

@lababidi thanks for your tips, after some efforts, I can run successfully in your way, which makes it so comfortable when using cmake.

freesouls commented May 15, 2017

@lababidi thanks for your tips, after some efforts, I can run successfully in your way, which makes it so comfortable when using cmake.

@haiy

This comment has been minimized.

Show comment
Hide comment
@haiy

haiy Jun 22, 2017

@lababidi @freesouls I've followed @lababidi method,but got the error below.Any suggestion?

Undefined symbols for architecture x86_64:
  "tensorflow::internal::CheckOpMessageBuilder::NewString[abi:cxx11]()", referenced from:
      std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >* tensorflow::internal::MakeCheckOpString<int, int>(int const&, int const&, char const*) in cc918f4y.o
ld: symbol(s) not found for architecture x86_64
collect2: error: ld returned 1 exit status

haiy commented Jun 22, 2017

@lababidi @freesouls I've followed @lababidi method,but got the error below.Any suggestion?

Undefined symbols for architecture x86_64:
  "tensorflow::internal::CheckOpMessageBuilder::NewString[abi:cxx11]()", referenced from:
      std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >* tensorflow::internal::MakeCheckOpString<int, int>(int const&, int const&, char const*) in cc918f4y.o
ld: symbol(s) not found for architecture x86_64
collect2: error: ld returned 1 exit status
@integeruser

This comment has been minimized.

Show comment
Hide comment
@integeruser

integeruser Jul 13, 2017

@haiy I had your same issue trying to compile some examples using g++-7 from Homebrew. I solved it by using instead the compiler shipped with macOS, i.e. /usr/bin/g++.

integeruser commented Jul 13, 2017

@haiy I had your same issue trying to compile some examples using g++-7 from Homebrew. I solved it by using instead the compiler shipped with macOS, i.e. /usr/bin/g++.

@jkravanja

This comment has been minimized.

Show comment
Hide comment
@jkravanja

jkravanja Jul 18, 2017

@lababidi Hi, thanks for you description of how to use standalone shared library. For me, libtensorflow_so compiled without a problem using bazel, but I have problems with includes, when i try to use it in a separate eclipse project, specifically with eigen3. I tried 2 options.

  1. Add tensorflow's third_party/eigen3 to the include path. This causes cyclic include, since unsupported/Eigen/CXX11/Tensor bacisally includes itself in the first line:
    #include "unsupported/Eigen/CXX11/Tensor".
    So this approach does not work.

  2. Using system installed /usr/include/eigen3, but in this case the error is:

tensorflow/core/framework/type_traits.h:69:52: error: ‘half’ is not a member of ‘Eigen’

I guess there is probably a trivial solution of just correctly configuring the include paths, but so far i have spent a lot of time on this with no luck. Does anybody have any ideas for how to do this correctly?

jkravanja commented Jul 18, 2017

@lababidi Hi, thanks for you description of how to use standalone shared library. For me, libtensorflow_so compiled without a problem using bazel, but I have problems with includes, when i try to use it in a separate eclipse project, specifically with eigen3. I tried 2 options.

  1. Add tensorflow's third_party/eigen3 to the include path. This causes cyclic include, since unsupported/Eigen/CXX11/Tensor bacisally includes itself in the first line:
    #include "unsupported/Eigen/CXX11/Tensor".
    So this approach does not work.

  2. Using system installed /usr/include/eigen3, but in this case the error is:

tensorflow/core/framework/type_traits.h:69:52: error: ‘half’ is not a member of ‘Eigen’

I guess there is probably a trivial solution of just correctly configuring the include paths, but so far i have spent a lot of time on this with no luck. Does anybody have any ideas for how to do this correctly?

@integeruser

This comment has been minimized.

Show comment
Hide comment
@integeruser

integeruser Jul 20, 2017

@jkravanja This is some bash code I use to copy the necessary files for compiling a separate project (after having built tensorflow):

cp -r $TENSORFLOW_DIR/tensorflow include/third_party
cp -r $TENSORFLOW_DIR/bazel-genfiles/tensorflow include/third_party
cp -r $TENSORFLOW_DIR/bazel-tensorflow/../../external/protobuf/src/google include/third_party
cp -r $TENSORFLOW_DIR/third_party/eigen3 include/third_party
cp -r $TENSORFLOW_DIR/bazel-tensorflow/../../external/eigen_archive/. include/third_party/eigen3
cp -r include/third_party/eigen3/Eigen include/third_party

where TENSORFLOW_DIR is the directory where you cloned the tensorflow repository (for example /opt/tensorflow), and include/third_party is the directory to include when compiling your project (-I include/third_party). This script probably copies a lot more files than the strictly necessary, but it works for me.

integeruser commented Jul 20, 2017

@jkravanja This is some bash code I use to copy the necessary files for compiling a separate project (after having built tensorflow):

cp -r $TENSORFLOW_DIR/tensorflow include/third_party
cp -r $TENSORFLOW_DIR/bazel-genfiles/tensorflow include/third_party
cp -r $TENSORFLOW_DIR/bazel-tensorflow/../../external/protobuf/src/google include/third_party
cp -r $TENSORFLOW_DIR/third_party/eigen3 include/third_party
cp -r $TENSORFLOW_DIR/bazel-tensorflow/../../external/eigen_archive/. include/third_party/eigen3
cp -r include/third_party/eigen3/Eigen include/third_party

where TENSORFLOW_DIR is the directory where you cloned the tensorflow repository (for example /opt/tensorflow), and include/third_party is the directory to include when compiling your project (-I include/third_party). This script probably copies a lot more files than the strictly necessary, but it works for me.

@jkravanja

This comment has been minimized.

Show comment
Hide comment
@jkravanja

jkravanja Jul 20, 2017

Thanks that works, but i have to add both include paths, include/third_party and also include/, since some headers include from "third_party/..."

jkravanja commented Jul 20, 2017

Thanks that works, but i have to add both include paths, include/third_party and also include/, since some headers include from "third_party/..."

@9thDimension

This comment has been minimized.

Show comment
Hide comment
@9thDimension

9thDimension Aug 4, 2017

@integeruser @jkravanja

I am having the same problem tensorflow/core/framework/type_traits.h:69:52: error: ‘half’ is not a member of ‘Eigen’.

I tried running all those copy commands, but it gets stuck at:

$TENSORFLOW_DIR/bazel-tensorflow/../../external/protobuf/src/google': No such file or directory.

EDIT: I managed to overcome the Eigen error by downloading the latest version of Eigen and linking to that, instead of the version available through Ubuntu 16.04 package manager.

9thDimension commented Aug 4, 2017

@integeruser @jkravanja

I am having the same problem tensorflow/core/framework/type_traits.h:69:52: error: ‘half’ is not a member of ‘Eigen’.

I tried running all those copy commands, but it gets stuck at:

$TENSORFLOW_DIR/bazel-tensorflow/../../external/protobuf/src/google': No such file or directory.

EDIT: I managed to overcome the Eigen error by downloading the latest version of Eigen and linking to that, instead of the version available through Ubuntu 16.04 package manager.

@jkravanja

This comment has been minimized.

Show comment
Hide comment
@jkravanja

jkravanja Aug 4, 2017

Probably you can try copying
cp -r $TENSORFLOW_DIR/bazel-tensorflow/external/protobuf/src/google include/third_party

jkravanja commented Aug 4, 2017

Probably you can try copying
cp -r $TENSORFLOW_DIR/bazel-tensorflow/external/protobuf/src/google include/third_party

@bobeo

This comment has been minimized.

Show comment
Hide comment
@bobeo

bobeo Aug 12, 2017

@9thDimension @jkravanja I have a lot of undefined errors. Any idea? I did compile libtensorflow_cc.so successfully.

bobeo commented Aug 12, 2017

@9thDimension @jkravanja I have a lot of undefined errors. Any idea? I did compile libtensorflow_cc.so successfully.

@jkravanja

This comment has been minimized.

Show comment
Hide comment
@jkravanja

jkravanja Aug 12, 2017

@bobeo undefined errors or undefined rference erros? Probably it is a linker error, you are missing some libraries. Can you copy paste it here?

jkravanja commented Aug 12, 2017

@bobeo undefined errors or undefined rference erros? Probably it is a linker error, you are missing some libraries. Can you copy paste it here?

@bobeo

This comment has been minimized.

Show comment
Hide comment
@bobeo

bobeo Aug 12, 2017

@jkravanja undefined reference errors:


/tmp/ccEdGM3i.o: In function `LoadGraph(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::unique_ptr<tensorflow::Session, std::default_delete<tensorflow::Session> >*)':
~/Downloads/simpleNetwork/simpleNetwork/loader.cpp:44: undefined reference to `tensorflow::GraphDef::GraphDef()'
~/Downloads/simpleNetwork/simpleNetwork/loader.cpp:46: undefined reference to `tensorflow::Env::Default()'
~/Downloads/simpleNetwork/simpleNetwork/loader.cpp:46: undefined reference to `tensorflow::ReadBinaryProto(tensorflow::Env*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, google::protobuf::MessageLite*)'
~/Downloads/simpleNetwork/simpleNetwork/loader.cpp:51: undefined reference to `tensorflow::SessionOptions::SessionOptions()'
~/Downloads/simpleNetwork/simpleNetwork/loader.cpp:51: undefined reference to `tensorflow::NewSession(tensorflow::SessionOptions const&)'
~/Downloads/simpleNetwork/simpleNetwork/loader.cpp:44: undefined reference to `tensorflow::GraphDef::~GraphDef()'
~/Downloads/simpleNetwork/simpleNetwork/loader.cpp:44: undefined reference to `tensorflow::GraphDef::~GraphDef()'
/tmp/ccEdGM3i.o: In function `main':
~/Downloads/simpleNetwork/simpleNetwork/loader.cpp:71: undefined reference to `tensorflow::SessionOptions::SessionOptions()'
~/Downloads/simpleNetwork/simpleNetwork/loader.cpp:71: undefined reference to `tensorflow::NewSession(tensorflow::SessionOptions const&, tensorflow::Session**)'
~/Downloads/simpleNetwork/simpleNetwork/loader.cpp:73: undefined reference to `tensorflow::Status::ToString[abi:cxx11]() const'
~/Downloads/simpleNetwork/simpleNetwork/loader.cpp:81: undefined reference to `tensorflow::GraphDef::GraphDef()'
~/Downloads/simpleNetwork/simpleNetwork/loader.cpp:84: undefined reference to `tensorflow::Env::Default()'
~/Downloads/simpleNetwork/simpleNetwork/loader.cpp:84: undefined reference to `tensorflow::ReadBinaryProto(tensorflow::Env*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, google::protobuf::MessageLite*)'
~/Downloads/simpleNetwork/simpleNetwork/loader.cpp:86: undefined reference to `tensorflow::Status::ToString[abi:cxx11]() const'
~/Downloads/simpleNetwork/simpleNetwork/loader.cpp:93: undefined reference to `tensorflow::Status::ToString[abi:cxx11]() const'
~/Downloads/simpleNetwork/simpleNetwork/loader.cpp:105: undefined reference to `tensorflow::Tensor::Tensor(tensorflow::DataType, tensorflow::TensorShape const&)'
~/Downloads/simpleNetwork/simpleNetwork/loader.cpp:144: undefined reference to `tensorflow::Status::ToString[abi:cxx11]() const'
~/Downloads/simpleNetwork/simpleNetwork/loader.cpp:156: undefined reference to `tensorflow::Tensor::DebugString[abi:cxx11]() const'
~/Downloads/simpleNetwork/simpleNetwork/loader.cpp:127: undefined reference to `tensorflow::Tensor::~Tensor()'
~/Downloads/simpleNetwork/simpleNetwork/loader.cpp:81: undefined reference to `tensorflow::GraphDef::~GraphDef()'
~/Downloads/simpleNetwork/simpleNetwork/loader.cpp:105: undefined reference to `tensorflow::Tensor::~Tensor()'
~/Downloads/simpleNetwork/simpleNetwork/loader.cpp:81: undefined reference to `tensorflow::GraphDef::~GraphDef()'
/tmp/ccEdGM3i.o: In function `tensorflow::Status::operator=(tensorflow::Status const&)':
~/Downloads/simpleNetwork/simpleNetwork/include/third_party/tensorflow/core/lib/core/status.h:106: undefined reference to `tensorflow::Status::SlowCopyFrom(tensorflow::Status::State const*)'
/tmp/ccEdGM3i.o: In function `tensorflow::TensorShapeRep::TensorShapeRep(tensorflow::TensorShapeRep const&)':
~/Downloads/simpleNetwork/simpleNetwork/include/third_party/tensorflow/core/framework/tensor_shape.h:477: undefined reference to `tensorflow::TensorShapeRep::SlowCopyFrom(tensorflow::TensorShapeRep const&)'
/tmp/ccEdGM3i.o: In function `tensorflow::TensorShapeRep::~TensorShapeRep()':
~/Downloads/simpleNetwork/simpleNetwork/include/third_party/tensorflow/core/framework/tensor_shape.h:492: undefined reference to `tensorflow::TensorShapeRep::DestructorOutOfLine()'
/tmp/ccEdGM3i.o: In function `tensorflow::core::RefCounted::~RefCounted()':
~/Downloads/simpleNetwork/simpleNetwork/include/third_party/tensorflow/core/lib/core/refcount.h:79: undefined reference to `tensorflow::internal::LogMessageFatal::LogMessageFatal(char const*, int)'
~/Downloads/simpleNetwork/simpleNetwork/include/third_party/tensorflow/core/lib/core/refcount.h:79: undefined reference to `tensorflow::internal::LogMessageFatal::~LogMessageFatal()'
/tmp/ccEdGM3i.o: In function `tensorflow::core::RefCounted::Ref() const':
~/Downloads/simpleNetwork/simpleNetwork/include/third_party/tensorflow/core/lib/core/refcount.h:82: undefined reference to `tensorflow::internal::LogMessageFatal::LogMessageFatal(char const*, int)'
~/Downloads/simpleNetwork/simpleNetwork/include/third_party/tensorflow/core/lib/core/refcount.h:82: undefined reference to `tensorflow::internal::LogMessageFatal::~LogMessageFatal()'
~/Downloads/simpleNetwork/simpleNetwork/include/third_party/tensorflow/core/lib/core/refcount.h:82: undefined reference to `tensorflow::internal::LogMessageFatal::~LogMessageFatal()'
/tmp/ccEdGM3i.o: In function `tensorflow::TensorShape::TensorShape(std::initializer_list<long long>)':
~/Downloads/simpleNetwork/simpleNetwork/include/third_party/tensorflow/core/framework/tensor_shape.h:273: undefined reference to `tensorflow::TensorShapeBase<tensorflow::TensorShape>::TensorShapeBase(std::initializer_list<long long>)'
/tmp/ccEdGM3i.o: In function `tensorflow::SessionOptions::~SessionOptions()':
~/Downloads/simpleNetwork/simpleNetwork/include/third_party/tensorflow/core/public/session_options.h:28: undefined reference to `tensorflow::ConfigProto::~ConfigProto()'
/tmp/ccEdGM3i.o: In function `std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, tensorflow::Tensor>::~pair()':
/usr/include/c++/5/bits/stl_pair.h:96: undefined reference to `tensorflow::Tensor::~Tensor()'
/tmp/ccEdGM3i.o: In function `tensorflow::Status tensorflow::errors::NotFound<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, char const*>(char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, char const*)':
~/Downloads/simpleNetwork/simpleNetwork/include/third_party/tensorflow/core/lib/core/errors.h:73: undefined reference to `tensorflow::strings::StrCat[abi:cxx11](tensorflow::strings::AlphaNum const&, tensorflow::strings::AlphaNum const&, tensorflow::strings::AlphaNum const&)'
~/Downloads/simpleNetwork/simpleNetwork/include/third_party/tensorflow/core/lib/core/errors.h:73: undefined reference to `tensorflow::Status::Status(tensorflow::error::Code, tensorflow::StringPiece)'
/tmp/ccEdGM3i.o: In function `tensorflow::TTypes<float, 2ul, long>::Tensor tensorflow::Tensor::tensor<float, 2ul>()':
~/Downloads/simpleNetwork/simpleNetwork/include/third_party/tensorflow/core/framework/tensor.h:535: undefined reference to `tensorflow::Tensor::CheckTypeAndIsAligned(tensorflow::DataType) const'
/tmp/ccEdGM3i.o: In function `tensorflow::TTypes<float, 1, long>::Scalar tensorflow::Tensor::scalar<float>()':
~/Downloads/simpleNetwork/simpleNetwork/include/third_party/tensorflow/core/framework/tensor.h:643: undefined reference to `tensorflow::Tensor::CheckIsAlignedAndSingleElement() const'
/tmp/ccEdGM3i.o: In function `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >* tensorflow::internal::MakeCheckOpString<long, int>(long const&, int const&, char const*)':
~/Downloads/simpleNetwork/simpleNetwork/include/third_party/tensorflow/core/platform/default/logging.h:184: undefined reference to `tensorflow::internal::CheckOpMessageBuilder::CheckOpMessageBuilder(char const*)'
~/Downloads/simpleNetwork/simpleNetwork/include/third_party/tensorflow/core/platform/default/logging.h:186: undefined reference to `tensorflow::internal::CheckOpMessageBuilder::ForVar2()'
~/Downloads/simpleNetwork/simpleNetwork/include/third_party/tensorflow/core/platform/default/logging.h:187: undefined reference to `tensorflow::internal::CheckOpMessageBuilder::NewString[abi:cxx11]()'
~/Downloads/simpleNetwork/simpleNetwork/include/third_party/tensorflow/core/platform/default/logging.h:184: undefined reference to `tensorflow::internal::CheckOpMessageBuilder::~CheckOpMessageBuilder()'
~/Downloads/simpleNetwork/simpleNetwork/include/third_party/tensorflow/core/platform/default/logging.h:184: undefined reference to `tensorflow::internal::CheckOpMessageBuilder::~CheckOpMessageBuilder()'
/tmp/ccEdGM3i.o: In function `Eigen::DSizes<long, 2> tensorflow::TensorShape::AsEigenDSizes<2>() const':
~/Downloads/simpleNetwork/simpleNetwork/include/third_party/tensorflow/core/framework/tensor_shape.h:445: undefined reference to `tensorflow::TensorShape::CheckDimsEqual(int) const'
/tmp/ccEdGM3i.o: In function `Eigen::DSizes<long, 2> tensorflow::TensorShape::AsEigenDSizesWithPadding<2>() const':
~/Downloads/simpleNetwork/simpleNetwork/include/third_party/tensorflow/core/framework/tensor_shape.h:452: undefined reference to `tensorflow::TensorShape::CheckDimsAtLeast(int) const'
~/Downloads/simpleNetwork/simpleNetwork/include/third_party/tensorflow/core/framework/tensor_shape.h:455: undefined reference to `tensorflow::TensorShapeBase<tensorflow::TensorShape>::dims() const'
~/Downloads/simpleNetwork/simpleNetwork/include/third_party/tensorflow/core/framework/tensor_shape.h:456: undefined reference to `tensorflow::TensorShapeBase<tensorflow::TensorShape>::dim_size(int) const'
~/Downloads/simpleNetwork/simpleNetwork/include/third_party/tensorflow/core/framework/tensor_shape.h:458: undefined reference to `tensorflow::TensorShapeBase<tensorflow::TensorShape>::dims() const'
/tmp/ccEdGM3i.o: In function `void std::_Destroy<tensorflow::Tensor>(tensorflow::Tensor*)':
/usr/include/c++/5/bits/stl_construct.h:93: undefined reference to `tensorflow::Tensor::~Tensor()'
collect2: error: ld returned 1 exit status

bobeo commented Aug 12, 2017

@jkravanja undefined reference errors:


/tmp/ccEdGM3i.o: In function `LoadGraph(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::unique_ptr<tensorflow::Session, std::default_delete<tensorflow::Session> >*)':
~/Downloads/simpleNetwork/simpleNetwork/loader.cpp:44: undefined reference to `tensorflow::GraphDef::GraphDef()'
~/Downloads/simpleNetwork/simpleNetwork/loader.cpp:46: undefined reference to `tensorflow::Env::Default()'
~/Downloads/simpleNetwork/simpleNetwork/loader.cpp:46: undefined reference to `tensorflow::ReadBinaryProto(tensorflow::Env*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, google::protobuf::MessageLite*)'
~/Downloads/simpleNetwork/simpleNetwork/loader.cpp:51: undefined reference to `tensorflow::SessionOptions::SessionOptions()'
~/Downloads/simpleNetwork/simpleNetwork/loader.cpp:51: undefined reference to `tensorflow::NewSession(tensorflow::SessionOptions const&)'
~/Downloads/simpleNetwork/simpleNetwork/loader.cpp:44: undefined reference to `tensorflow::GraphDef::~GraphDef()'
~/Downloads/simpleNetwork/simpleNetwork/loader.cpp:44: undefined reference to `tensorflow::GraphDef::~GraphDef()'
/tmp/ccEdGM3i.o: In function `main':
~/Downloads/simpleNetwork/simpleNetwork/loader.cpp:71: undefined reference to `tensorflow::SessionOptions::SessionOptions()'
~/Downloads/simpleNetwork/simpleNetwork/loader.cpp:71: undefined reference to `tensorflow::NewSession(tensorflow::SessionOptions const&, tensorflow::Session**)'
~/Downloads/simpleNetwork/simpleNetwork/loader.cpp:73: undefined reference to `tensorflow::Status::ToString[abi:cxx11]() const'
~/Downloads/simpleNetwork/simpleNetwork/loader.cpp:81: undefined reference to `tensorflow::GraphDef::GraphDef()'
~/Downloads/simpleNetwork/simpleNetwork/loader.cpp:84: undefined reference to `tensorflow::Env::Default()'
~/Downloads/simpleNetwork/simpleNetwork/loader.cpp:84: undefined reference to `tensorflow::ReadBinaryProto(tensorflow::Env*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, google::protobuf::MessageLite*)'
~/Downloads/simpleNetwork/simpleNetwork/loader.cpp:86: undefined reference to `tensorflow::Status::ToString[abi:cxx11]() const'
~/Downloads/simpleNetwork/simpleNetwork/loader.cpp:93: undefined reference to `tensorflow::Status::ToString[abi:cxx11]() const'
~/Downloads/simpleNetwork/simpleNetwork/loader.cpp:105: undefined reference to `tensorflow::Tensor::Tensor(tensorflow::DataType, tensorflow::TensorShape const&)'
~/Downloads/simpleNetwork/simpleNetwork/loader.cpp:144: undefined reference to `tensorflow::Status::ToString[abi:cxx11]() const'
~/Downloads/simpleNetwork/simpleNetwork/loader.cpp:156: undefined reference to `tensorflow::Tensor::DebugString[abi:cxx11]() const'
~/Downloads/simpleNetwork/simpleNetwork/loader.cpp:127: undefined reference to `tensorflow::Tensor::~Tensor()'
~/Downloads/simpleNetwork/simpleNetwork/loader.cpp:81: undefined reference to `tensorflow::GraphDef::~GraphDef()'
~/Downloads/simpleNetwork/simpleNetwork/loader.cpp:105: undefined reference to `tensorflow::Tensor::~Tensor()'
~/Downloads/simpleNetwork/simpleNetwork/loader.cpp:81: undefined reference to `tensorflow::GraphDef::~GraphDef()'
/tmp/ccEdGM3i.o: In function `tensorflow::Status::operator=(tensorflow::Status const&)':
~/Downloads/simpleNetwork/simpleNetwork/include/third_party/tensorflow/core/lib/core/status.h:106: undefined reference to `tensorflow::Status::SlowCopyFrom(tensorflow::Status::State const*)'
/tmp/ccEdGM3i.o: In function `tensorflow::TensorShapeRep::TensorShapeRep(tensorflow::TensorShapeRep const&)':
~/Downloads/simpleNetwork/simpleNetwork/include/third_party/tensorflow/core/framework/tensor_shape.h:477: undefined reference to `tensorflow::TensorShapeRep::SlowCopyFrom(tensorflow::TensorShapeRep const&)'
/tmp/ccEdGM3i.o: In function `tensorflow::TensorShapeRep::~TensorShapeRep()':
~/Downloads/simpleNetwork/simpleNetwork/include/third_party/tensorflow/core/framework/tensor_shape.h:492: undefined reference to `tensorflow::TensorShapeRep::DestructorOutOfLine()'
/tmp/ccEdGM3i.o: In function `tensorflow::core::RefCounted::~RefCounted()':
~/Downloads/simpleNetwork/simpleNetwork/include/third_party/tensorflow/core/lib/core/refcount.h:79: undefined reference to `tensorflow::internal::LogMessageFatal::LogMessageFatal(char const*, int)'
~/Downloads/simpleNetwork/simpleNetwork/include/third_party/tensorflow/core/lib/core/refcount.h:79: undefined reference to `tensorflow::internal::LogMessageFatal::~LogMessageFatal()'
/tmp/ccEdGM3i.o: In function `tensorflow::core::RefCounted::Ref() const':
~/Downloads/simpleNetwork/simpleNetwork/include/third_party/tensorflow/core/lib/core/refcount.h:82: undefined reference to `tensorflow::internal::LogMessageFatal::LogMessageFatal(char const*, int)'
~/Downloads/simpleNetwork/simpleNetwork/include/third_party/tensorflow/core/lib/core/refcount.h:82: undefined reference to `tensorflow::internal::LogMessageFatal::~LogMessageFatal()'
~/Downloads/simpleNetwork/simpleNetwork/include/third_party/tensorflow/core/lib/core/refcount.h:82: undefined reference to `tensorflow::internal::LogMessageFatal::~LogMessageFatal()'
/tmp/ccEdGM3i.o: In function `tensorflow::TensorShape::TensorShape(std::initializer_list<long long>)':
~/Downloads/simpleNetwork/simpleNetwork/include/third_party/tensorflow/core/framework/tensor_shape.h:273: undefined reference to `tensorflow::TensorShapeBase<tensorflow::TensorShape>::TensorShapeBase(std::initializer_list<long long>)'
/tmp/ccEdGM3i.o: In function `tensorflow::SessionOptions::~SessionOptions()':
~/Downloads/simpleNetwork/simpleNetwork/include/third_party/tensorflow/core/public/session_options.h:28: undefined reference to `tensorflow::ConfigProto::~ConfigProto()'
/tmp/ccEdGM3i.o: In function `std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, tensorflow::Tensor>::~pair()':
/usr/include/c++/5/bits/stl_pair.h:96: undefined reference to `tensorflow::Tensor::~Tensor()'
/tmp/ccEdGM3i.o: In function `tensorflow::Status tensorflow::errors::NotFound<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, char const*>(char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, char const*)':
~/Downloads/simpleNetwork/simpleNetwork/include/third_party/tensorflow/core/lib/core/errors.h:73: undefined reference to `tensorflow::strings::StrCat[abi:cxx11](tensorflow::strings::AlphaNum const&, tensorflow::strings::AlphaNum const&, tensorflow::strings::AlphaNum const&)'
~/Downloads/simpleNetwork/simpleNetwork/include/third_party/tensorflow/core/lib/core/errors.h:73: undefined reference to `tensorflow::Status::Status(tensorflow::error::Code, tensorflow::StringPiece)'
/tmp/ccEdGM3i.o: In function `tensorflow::TTypes<float, 2ul, long>::Tensor tensorflow::Tensor::tensor<float, 2ul>()':
~/Downloads/simpleNetwork/simpleNetwork/include/third_party/tensorflow/core/framework/tensor.h:535: undefined reference to `tensorflow::Tensor::CheckTypeAndIsAligned(tensorflow::DataType) const'
/tmp/ccEdGM3i.o: In function `tensorflow::TTypes<float, 1, long>::Scalar tensorflow::Tensor::scalar<float>()':
~/Downloads/simpleNetwork/simpleNetwork/include/third_party/tensorflow/core/framework/tensor.h:643: undefined reference to `tensorflow::Tensor::CheckIsAlignedAndSingleElement() const'
/tmp/ccEdGM3i.o: In function `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >* tensorflow::internal::MakeCheckOpString<long, int>(long const&, int const&, char const*)':
~/Downloads/simpleNetwork/simpleNetwork/include/third_party/tensorflow/core/platform/default/logging.h:184: undefined reference to `tensorflow::internal::CheckOpMessageBuilder::CheckOpMessageBuilder(char const*)'
~/Downloads/simpleNetwork/simpleNetwork/include/third_party/tensorflow/core/platform/default/logging.h:186: undefined reference to `tensorflow::internal::CheckOpMessageBuilder::ForVar2()'
~/Downloads/simpleNetwork/simpleNetwork/include/third_party/tensorflow/core/platform/default/logging.h:187: undefined reference to `tensorflow::internal::CheckOpMessageBuilder::NewString[abi:cxx11]()'
~/Downloads/simpleNetwork/simpleNetwork/include/third_party/tensorflow/core/platform/default/logging.h:184: undefined reference to `tensorflow::internal::CheckOpMessageBuilder::~CheckOpMessageBuilder()'
~/Downloads/simpleNetwork/simpleNetwork/include/third_party/tensorflow/core/platform/default/logging.h:184: undefined reference to `tensorflow::internal::CheckOpMessageBuilder::~CheckOpMessageBuilder()'
/tmp/ccEdGM3i.o: In function `Eigen::DSizes<long, 2> tensorflow::TensorShape::AsEigenDSizes<2>() const':
~/Downloads/simpleNetwork/simpleNetwork/include/third_party/tensorflow/core/framework/tensor_shape.h:445: undefined reference to `tensorflow::TensorShape::CheckDimsEqual(int) const'
/tmp/ccEdGM3i.o: In function `Eigen::DSizes<long, 2> tensorflow::TensorShape::AsEigenDSizesWithPadding<2>() const':
~/Downloads/simpleNetwork/simpleNetwork/include/third_party/tensorflow/core/framework/tensor_shape.h:452: undefined reference to `tensorflow::TensorShape::CheckDimsAtLeast(int) const'
~/Downloads/simpleNetwork/simpleNetwork/include/third_party/tensorflow/core/framework/tensor_shape.h:455: undefined reference to `tensorflow::TensorShapeBase<tensorflow::TensorShape>::dims() const'
~/Downloads/simpleNetwork/simpleNetwork/include/third_party/tensorflow/core/framework/tensor_shape.h:456: undefined reference to `tensorflow::TensorShapeBase<tensorflow::TensorShape>::dim_size(int) const'
~/Downloads/simpleNetwork/simpleNetwork/include/third_party/tensorflow/core/framework/tensor_shape.h:458: undefined reference to `tensorflow::TensorShapeBase<tensorflow::TensorShape>::dims() const'
/tmp/ccEdGM3i.o: In function `void std::_Destroy<tensorflow::Tensor>(tensorflow::Tensor*)':
/usr/include/c++/5/bits/stl_construct.h:93: undefined reference to `tensorflow::Tensor::~Tensor()'
collect2: error: ld returned 1 exit status
@jkravanja

This comment has been minimized.

Show comment
Hide comment
@jkravanja

jkravanja Aug 13, 2017

Do you link against libtensorflow_cc.so? You should use a linkflag when you compile your program, -ltensorflow_cc

jkravanja commented Aug 13, 2017

Do you link against libtensorflow_cc.so? You should use a linkflag when you compile your program, -ltensorflow_cc

@bobeo

This comment has been minimized.

Show comment
Hide comment
@bobeo

bobeo Aug 13, 2017

@jkravanja yes i did

g++ -std=c++11 -o tLoader -Iinclude/third_party -Iinclude -g -Wall -D_DEBUG -Wshadow -Wno-sign-compare -w -L~/tensorflow/bazel-bin/tensorflow/pkg-config --cflags --libs protobuf-ltensorflow_cc loader.cpp

bobeo commented Aug 13, 2017

@jkravanja yes i did

g++ -std=c++11 -o tLoader -Iinclude/third_party -Iinclude -g -Wall -D_DEBUG -Wshadow -Wno-sign-compare -w -L~/tensorflow/bazel-bin/tensorflow/pkg-config --cflags --libs protobuf-ltensorflow_cc loader.cpp

@bobeo

This comment has been minimized.

Show comment
Hide comment
@bobeo

bobeo Aug 13, 2017

@jkravanja all good now when I run this instead :

g++ -std=c++11 -o tLoader loader.cpp -Iinclude/third_party -Iinclude -g -Wall -D_DEBUG -Wshadow -Wno-sign-compare -w -L~/tensorflow/bazel-bin/tensorflow/ -ltensorflow_cc pkg-config --cflags --libs protobuf

bobeo commented Aug 13, 2017

@jkravanja all good now when I run this instead :

g++ -std=c++11 -o tLoader loader.cpp -Iinclude/third_party -Iinclude -g -Wall -D_DEBUG -Wshadow -Wno-sign-compare -w -L~/tensorflow/bazel-bin/tensorflow/ -ltensorflow_cc pkg-config --cflags --libs protobuf

@sidhunileshwar13894

This comment has been minimized.

Show comment
Hide comment
@sidhunileshwar13894

sidhunileshwar13894 Aug 14, 2017

Sir i created a trained model using Tensorflow Inception. I use the Flower data set.
But i cant find .pb file anywhere....

The codes are specified below...

FLOWERS_DATA_DIR=/tmp/flowers-data/

cd tensorflow-models/inception
bazel build //inception:download_and_preprocess_flowers

bazel-bin/inception/download_and_preprocess_flowers "${FLOWERS_DATA_DIR}"

Now the .tfr file created sucessfully.

INCEPTION_MODEL_DIR=$HOME/inception-v3-model
mkdir -p ${INCEPTION_MODEL_DIR}
cd ${INCEPTION_MODEL_DIR}

curl -O http://download.tensorflow.org/models/image/imagenet/inception-v3-2016-03-01.tar.gz
tar xzf inception-v3-2016-03-01.tar.gz

this will create a directory called inception-v3 which contains the following files.

ls inception-v3
README.txt
checkpoint
model.ckpt-157585

cd tensorflow-models/inception
bazel build //inception:flowers_train

Path to the downloaded Inception-v3 model.

MODEL_PATH="${INCEPTION_MODEL_DIR}/inception-v3/model.ckpt-157585"

Directory where the flowers data resides.

FLOWERS_DATA_DIR=/tmp/flowers-data/

Directory where to save the checkpoint and events files.

TRAIN_DIR=/tmp/flowers_train/

Run the fine-tuning on the flowers data set starting from the pre-trained

Imagenet-v3 model.

bazel-bin/inception/flowers_train
--train_dir="${TRAIN_DIR}"
--data_dir="${FLOWERS_DATA_DIR}"
--pretrained_model_checkpoint_path="${MODEL_PATH}"
--fine_tune=True
--initial_learning_rate=0.001
--input_queue_memory_factor=1

Please help me..

sidhunileshwar13894 commented Aug 14, 2017

Sir i created a trained model using Tensorflow Inception. I use the Flower data set.
But i cant find .pb file anywhere....

The codes are specified below...

FLOWERS_DATA_DIR=/tmp/flowers-data/

cd tensorflow-models/inception
bazel build //inception:download_and_preprocess_flowers

bazel-bin/inception/download_and_preprocess_flowers "${FLOWERS_DATA_DIR}"

Now the .tfr file created sucessfully.

INCEPTION_MODEL_DIR=$HOME/inception-v3-model
mkdir -p ${INCEPTION_MODEL_DIR}
cd ${INCEPTION_MODEL_DIR}

curl -O http://download.tensorflow.org/models/image/imagenet/inception-v3-2016-03-01.tar.gz
tar xzf inception-v3-2016-03-01.tar.gz

this will create a directory called inception-v3 which contains the following files.

ls inception-v3
README.txt
checkpoint
model.ckpt-157585

cd tensorflow-models/inception
bazel build //inception:flowers_train

Path to the downloaded Inception-v3 model.

MODEL_PATH="${INCEPTION_MODEL_DIR}/inception-v3/model.ckpt-157585"

Directory where the flowers data resides.

FLOWERS_DATA_DIR=/tmp/flowers-data/

Directory where to save the checkpoint and events files.

TRAIN_DIR=/tmp/flowers_train/

Run the fine-tuning on the flowers data set starting from the pre-trained

Imagenet-v3 model.

bazel-bin/inception/flowers_train
--train_dir="${TRAIN_DIR}"
--data_dir="${FLOWERS_DATA_DIR}"
--pretrained_model_checkpoint_path="${MODEL_PATH}"
--fine_tune=True
--initial_learning_rate=0.001
--input_queue_memory_factor=1

Please help me..

@drabaioli

This comment has been minimized.

Show comment
Hide comment
@drabaioli

drabaioli Sep 28, 2017

The comments in here are precious!!!
After all of this effort, isn't it possible to have an official tensorflow_cc-dev package? isn't it possible to have a more official way of compiling tensorflow based c++ project out of the source tree? It feels like a very important feature to me!

drabaioli commented Sep 28, 2017

The comments in here are precious!!!
After all of this effort, isn't it possible to have an official tensorflow_cc-dev package? isn't it possible to have a more official way of compiling tensorflow based c++ project out of the source tree? It feels like a very important feature to me!

@carol-hsu

This comment has been minimized.

Show comment
Hide comment

carol-hsu commented Oct 21, 2017

@xiupingmath

This comment has been minimized.

Show comment
Hide comment
@xiupingmath

xiupingmath Mar 26, 2018

@lababidi Hi, I did the following according to you tips,
mkdir /usr/local/include/tf
cp -r bazel-genfiles/ /usr/local/include/tf/
cp -r tensorflow /usr/local/include/tf/
cp -r third_party /usr/local/include/tf/
cp -r bazel-bin/libtensorflow_cc.so /usr/local/lib/

and make

g++ -std=c++11 -o tLoader -I/usr/local/include/tf -I/usr/local/include/eigen3 -g -Wall -D_DEBUG -Wshadow -Wno-sign-compare -w -L/usr/local/lib/libtensorflow_cc pkg-config --cflags --libs protobuf -ltensorflow_cc loader.cpp

however, I met an error,

/usr/local/include/tf/tensorflow/core/framework/numeric_types.h:60:34: error: ‘log’ is not a template function
/usr/local/include/tf/tensorflow/core/framework/numeric_types.h:66:34: error: ‘exp’ is not a template function
/usr/local/include/tf/tensorflow/core/framework/numeric_types.h:72:34: error: ‘abs’ is not a template function

any suggestions?Thanks

xiupingmath commented Mar 26, 2018

@lababidi Hi, I did the following according to you tips,
mkdir /usr/local/include/tf
cp -r bazel-genfiles/ /usr/local/include/tf/
cp -r tensorflow /usr/local/include/tf/
cp -r third_party /usr/local/include/tf/
cp -r bazel-bin/libtensorflow_cc.so /usr/local/lib/

and make

g++ -std=c++11 -o tLoader -I/usr/local/include/tf -I/usr/local/include/eigen3 -g -Wall -D_DEBUG -Wshadow -Wno-sign-compare -w -L/usr/local/lib/libtensorflow_cc pkg-config --cflags --libs protobuf -ltensorflow_cc loader.cpp

however, I met an error,

/usr/local/include/tf/tensorflow/core/framework/numeric_types.h:60:34: error: ‘log’ is not a template function
/usr/local/include/tf/tensorflow/core/framework/numeric_types.h:66:34: error: ‘exp’ is not a template function
/usr/local/include/tf/tensorflow/core/framework/numeric_types.h:72:34: error: ‘abs’ is not a template function

any suggestions?Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment