0

I am working on a TF project. I want to create a TF Tensor of a certain shape {batch_size,rows,cols,channels}.

Now doing this:

  tensorflow::Tensor T(tensorflow::DT_FLOAT, tensorflow::TensorShape({1,rows,cols,channels}));

Should work as I have seen it work here.

Now when I try to compile using bazel ( with the project created with the instruction here)

However Bazel doesn't like it so it gives me this error:

In instantiation of 'std::__cxx11::string* tensorflow::internal::Check_LTImpl(const T1&, const T2&, const char*) [with T1 = unsigned int; T2 = int; std::__cxx11::string = std::__cxx11::basic_string]':

EDIT:

Full error here.

The Code in question here and here.

The BUILD file.

Community
  • 1
  • 1
Alperen AYDIN
  • 547
  • 1
  • 6
  • 17
  • Can you include the complete compiler error? You're missing some important details. – Peter Hawkins Aug 18 '16 at 15:10
  • I figured the source my error. In my function, I was using T.matrix(). In that case, TF doesn't necessarily know the dimension. Later I use T_M(s,r,c,ch) and since the dimension is undetemined. It throws and error. Using T.tensor() seems to solve this. Sorry for bothering you all. – Alperen AYDIN Aug 19 '16 at 07:25

0 Answers0