Skip to content
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

Update for tensorflow 0.10.0rc0 #266

Merged
merged 23 commits into from
Oct 1, 2016
Merged

Update for tensorflow 0.10.0rc0 #266

merged 23 commits into from
Oct 1, 2016

Conversation

mirosval
Copy link
Contributor

Please if somebody could review this.

For example I had to rename Cast op to CastOp and Const op to ConstOp otherwise it wouldn’t compile.

I’m pretty sure also other things need to be improved/fixed as I don’t really understand all of the ramifications of these changes

import org.bytedeco.javacpp.annotation.Cast;
import org.bytedeco.javacpp.annotation.Platform;
import org.bytedeco.javacpp.annotation.Properties;
import org.bytedeco.javacpp.tools.Info;
import org.bytedeco.javacpp.tools.InfoMap;
import org.bytedeco.javacpp.tools.InfoMapper;

import java.lang.annotation.*;

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I this is preferable to have all the imports explicit.

Miroslav Zoricak added 2 commits August 15, 2016 10:50
Since TF project added the *.so to the targets the patch is no longer
necessary
@mirosval
Copy link
Contributor Author

I applied the suggested changes, but it turns out that there are compilation problems at a later stage. I'm really not sure how to deal with them.

javacpp-presets/tensorflow/target/classes/org/bytedeco/javacpp/jnitensorflow.cpp:85747:53: error: call to implicitly-deleted default constructor of
      '::tensorflow::CompositeOpScopes'
        ::tensorflow::CompositeOpScopes* rptr = new ::tensorflow::CompositeOpScopes();
                                                    ^
javacpp-presets/tensorflow/cppbuild/macosx-x86_64/tensorflow-0.10.0rc0/tensorflow/cc/framework/scope.h:253:9: note: default constructor of 'CompositeOpScopes'
      is implicitly deleted because field 'child' has no default constructor
  Scope child;
        ^
javacpp-presets/tensorflow/target/classes/org/bytedeco/javacpp/jnitensorflow.cpp:85774:16: error: object of type 'tensorflow::Scope' cannot be assigned because
      its copy assignment operator is implicitly deleted
    ptr->child = *ptr0;
               ^
javacpp-presets/tensorflow/cppbuild/macosx-x86_64/tensorflow-0.10.0rc0/tensorflow/cc/framework/scope.h:238:37: note: copy assignment operator of 'Scope' is
      implicitly deleted because field 'control_deps_' has no copy assignment operator
  const std::vector<ops::Operation> control_deps_;
                                    ^
javacpp-presets/tensorflow/target/classes/org/bytedeco/javacpp/jnitensorflow.cpp:85799:53: error: call to implicitly-deleted default constructor of
      '::tensorflow::CompositeOpScopes'
        ::tensorflow::CompositeOpScopes* rptr = new ::tensorflow::CompositeOpScopes[arg0];
                                                    ^
javacpp-presets/tensorflow/cppbuild/macosx-x86_64/tensorflow-0.10.0rc0/tensorflow/cc/framework/scope.h:253:9: note: default constructor of 'CompositeOpScopes'
      is implicitly deleted because field 'child' has no default constructor
  Scope child;
        ^

@mirosval
Copy link
Contributor Author

Another issue is that there seem to be two ops Cast and Const which obviously causes problems because of the naming clashes.

I tried:

.put(new Info("Cast").skip())
// or
.put(new Info("Cast").pointerTypes("CastOp"))

but both finished with an error. It either can not be transformed to java in tensorflow.java, because Cast conflicts with an annotation name, or it will fail later when compiling the C++ JNI because I renamed it to CastOp and it can't find such an OP.

Roughly the same problem is with Const

@saudet
Copy link
Member

saudet commented Aug 15, 2016

It works for me with the following, but it looks like a lot has changed since version 0.9.0. The C++ compiler complains about of bunch of unrelated errors that we'll need to fix.

.put(new Info("tensorflow::ops::Cast").pointerTypes("CastOp"))
.put(new Info("tensorflow::ops::Const").pointerTypes("ConstOp"))

Also, building the "//tensorflow:libtensorflow.so" doesn't get us the C++ ops API, but "//tensorflow:libtensorflow_cc.so" does so we should probably be using that.

@mirosval
Copy link
Contributor Author

I have been able to compile it if I skip or remove all of the offending C++ types. I can live without the Ops, but I need the Env class which seems to depend on e.g. RandomAccessFile. The problem is that RandomAccessFile comes in as std::unique_ptr<::tensorflow::RandomAccessFile> and I have no idea how to convert it.

I have tried:

.put(new Info("std::unique_ptr<tensorflow::RandomAccessFile>").pointerTypes("RandomAccessFiles"))

but this results in:

javacpp-presets/tensorflow/target/classes/org/bytedeco/javacpp/jnitensorflow.cpp:70137:90: error: cannot initialize a parameter of type 'std::unique_ptr<RandomAccessFile> *' with an lvalue of type '::tensorflow::RandomAccessFile *'
        rptr = new ::tensorflow::Status(ptr->NewRandomAccessFile((std::string&)adapter0, ptr1));
                                                                                         ^~~~
javacpp-presets/tensorflow/cppbuild/macosx-x86_64/tensorflow-0.10.0rc0/tensorflow/core/platform/env.h:88:65: note: passing argument to parameter 'result' here
                             std::unique_ptr<RandomAccessFile>* result);

If I manually edit jnitensorflow.cpp and replace:

rptr = new ::tensorflow::Status(ptr-> NewRandomAccessFile((std::string&)adapter0, ptr1));

with:

rptr = new ::tensorflow::Status(ptr-> NewRandomAccessFile((std::string&)adapter0, (std::unique_ptr<::tensorflow::RandomAccessFile> *)ptr1));

then it compiles, but I have no idea either how to achieve this with the Info or if it is even the right thing to do.

How can I represent unique pointers?

saudet added a commit to bytedeco/javacpp that referenced this pull request Aug 20, 2016
@saudet
Copy link
Member

saudet commented Aug 20, 2016

Just now, I added support for unique_ptr. Not tested with TensorFlow yet, but after defining UNIQUE_PTR_NAMESPACE to std, it should pick it up.

@andreas-eberle
Copy link
Contributor

What's the status on this?

@mirosval
Copy link
Contributor Author

mirosval commented Sep 8, 2016

Waiting for Tensorflow 0.10 to be released.

@andreas-eberle
Copy link
Contributor

But your current version (this PR) is fully working with the current RC?

@mirosval
Copy link
Contributor Author

mirosval commented Sep 8, 2016

It works for me™. However I had to remove some ops in order to get it to work. But if your goal is to open a session, load a model and then run predictions, then that has worked for me.

@andreas-eberle
Copy link
Contributor

Do you have a branch where you have removed those ops / a branch that is compiling?

Miroslav Zoricak added 3 commits September 8, 2016 14:08
@mirosval
Copy link
Contributor Author

mirosval commented Sep 8, 2016

@andreas-eberle I merged master and resolved the conflicts. Now it compiles for me with
mvn install --projects .,tensorflow

@juraj-bicikl
Copy link

Hi, I tried to compile it using "mvn install --projects .,tensorflow" on a Mac, however I got this (during linking stage):

ld: library not found for -ltensorflow
clang: error: linker command failed with exit code 1 (use -v to see invocation)

This step works fine on previous javacpp-presets commits (with tensorflow 0.9).

@mirosval
Copy link
Contributor Author

mirosval commented Sep 9, 2016

That has to be something trivial, like a botched tensorflow install.
I think you need to also run ./cppbuild.sh in the main directory.

@mirosval
Copy link
Contributor Author

@saudet I don't know why google is not tagging TF final release on GitHub, but on the website they have r0.10 as the default when installing. Also there have been no substantial commits in the past weeks to r0.10. So I have switched to the head of the r0.10 branch and built from there. It seems fairly stable now, so maybe you can merge this...

@sonalgupta
Copy link

I was able to build @mirosval's code with javacpp 1.2.4. But got the exact same error of F tensorflow/core/framework/function.cc:885] Check failed: GetOpGradFactory()->insert({op, func}).second Duplicated gradient for Shape I trained my RNN model in Python and am trying to load the graph in Java.

@mirosval
Copy link
Contributor Author

It should work if you check out at the above mentioned commit. Except you won't have access to the ops.

@saudet
Copy link
Member

saudet commented Sep 22, 2016

Ah, here's the issue. We need to build the "libtensorflow_cc.so" target, not "libtensorflow.so". The patch in the presets for old versions of TensorFlow included the ops in "libtensorflow.so", but they've since made them available as part of "libtensorflow_cc.so" instead. By building "libtensorflow_cc.so" we also get all the header files for the ops. We don't need to include, parse, and compile the *.cc source files. The build process is supposed to do that for us and generate simple *.h header files.

Similarly, the REGISTER_GRADIENT_OP etc macros only get used in math_grad.cc and they are not exported (unused) so we can safely ignore that.

@andreas-eberle
Copy link
Contributor

What is the status on this? @mirosval: Does this version fully work for you now? If yes, is there something else preventing this from being merged?

@mirosval
Copy link
Contributor Author

It does work for me. However I only use a subset of the functionality (create session, load protobuf, run prediction), so take it with a grain of salt.

I think generally it could be merged, but that's @saudet's call.

@andreas-eberle
Copy link
Contributor

andreas-eberle commented Sep 27, 2016

I tried to build this PR and had some issues:

  • When I try to execute mvn install --projects .,tensorflow, I get the following error for every other project than tensorflow
[ERROR]   The project org.bytedeco.javacpp-presets:cuda:8.0-${project.parent.version} (/Users/aeberle/programming/javacpp-presets/cuda/pom.xml) has 1 error
[ERROR]     Non-resolvable parent POM for org.bytedeco.javacpp-presets:cuda:8.0-${project.parent.version}: Failure to find org.bytedeco:javacpp-presets:pom:1.2.2 in http://maven.repository.redhat.com/earlyaccess/all/ was cached in the local repository, resolution will not be reattempted until the update interval of jboss-earlyaccess-repository has elapsed or updates are forced and 'parent.relativePath' points at wrong local POM @ line 6, column 11 -> [Help 2]

I was able to fix this by updating the version of the parent pom in all the other poms to the same one used by the tensorflow module. Is there another way than setting all these versions manually?

  • The javacpp version used in this PR does not include the latest changes regarding the COUNTER stuff mentioned by @saudet. Only the 1.2.5-SNAPSHOT currently contains these changes. After I built that version manually and adapted all the versions in the poms, I now face the next problem.
  • When executing mvn install --projects .,tensorflow after applying the changes mentioned above, I get the following error
In file included from /Users/aeberle/Documents/programming/java/dekra/javacpp-presets-clean/tensorflow/target/classes/org/bytedeco/javacpp/jnitensorflow.cpp:107:
In file included from /Users/aeberle/Documents/programming/java/dekra/javacpp-presets-clean/tensorflow/cppbuild/macosx-x86_64/tensorflow-0.10.0/bazel-genfiles/tensorflow/core/lib/core/error_codes.pb.h:22:
In file included from /Users/aeberle/Documents/programming/java/dekra/javacpp-presets-clean/tensorflow/cppbuild/macosx-x86_64/tensorflow-0.10.0/bazel-tensorflow-0.10.0/external/protobuf/src/google/protobuf/arena.h:52:
In file included from /Users/aeberle/Documents/programming/java/dekra/javacpp-presets-clean/tensorflow/cppbuild/macosx-x86_64/tensorflow-0.10.0/bazel-tensorflow-0.10.0/external/protobuf/src/google/protobuf/stubs/atomic_sequence_num.h:33:
In file included from /Users/aeberle/Documents/programming/java/dekra/javacpp-presets-clean/tensorflow/cppbuild/macosx-x86_64/tensorflow-0.10.0/bazel-tensorflow-0.10.0/external/protobuf/src/google/protobuf/stubs/atomicops.h:199:
/Users/aeberle/Documents/programming/java/dekra/javacpp-presets-clean/tensorflow/cppbuild/macosx-x86_64/tensorflow-0.10.0/bazel-tensorflow-0.10.0/external/protobuf/src/google/protobuf/stubs/atomicops_internals_macosx.h:173:9: warning: 
      'OSAtomicCompareAndSwap64Barrier' is deprecated: first deprecated in macOS 10.12 - Use std::atomic_compare_exchange_strong() from <atomic> instead [-Wdeprecated-declarations]
    if (OSAtomicCompareAndSwap64Barrier(
        ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/usr/include/libkern/OSAtomicDeprecated.h:645:9: note: 
      'OSAtomicCompareAndSwap64Barrier' has been explicitly marked deprecated here
bool    OSAtomicCompareAndSwap64Barrier( int64_t __oldValue, int64_t __newValue,
        ^
/Users/aeberle/Documents/programming/java/dekra/javacpp-presets-clean/tensorflow/target/classes/org/bytedeco/javacpp/jnitensorflow.cpp:933:72: warning: cannot delete expression with
      pointer-to-'void' type 'void *' [-Wdelete-incomplete]
static void JavaCPP_org_bytedeco_javacpp_Pointer_deallocate(void *p) { delete (void*)p; }
                                                                       ^      ~~~~~~~~
/Users/aeberle/Documents/programming/java/dekra/javacpp-presets-clean/tensorflow/target/classes/org/bytedeco/javacpp/jnitensorflow.cpp:2591:24: warning: 
      'JavaCPP_org_bytedeco_javacpp_presets_tensorflow_00024EdgeLabelFunction_allocate_callback' has C-linkage specified, but returns user-defined type 'std::string &' (aka
      'basic_string<char, char_traits<char>, allocator<char> > &') which is incompatible with C [-Wreturn-type-c-linkage]
JNIEXPORT std::string& JavaCPP_org_bytedeco_javacpp_presets_tensorflow_00024EdgeLabelFunction_allocate_callback(const tensorflow::Edge* arg0) {
                       ^
/Users/aeberle/Documents/programming/java/dekra/javacpp-presets-clean/tensorflow/target/classes/org/bytedeco/javacpp/jnitensorflow.cpp:2714:24: warning: 
      'JavaCPP_org_bytedeco_javacpp_presets_tensorflow_00024NodeLabelFunction_allocate_callback' has C-linkage specified, but returns user-defined type 'std::string &' (aka
      'basic_string<char, char_traits<char>, allocator<char> > &') which is incompatible with C [-Wreturn-type-c-linkage]
JNIEXPORT std::string& JavaCPP_org_bytedeco_javacpp_presets_tensorflow_00024NodeLabelFunction_allocate_callback(const tensorflow::Node* arg0) {
                       ^
/Users/aeberle/Documents/programming/java/dekra/javacpp-presets-clean/tensorflow/target/classes/org/bytedeco/javacpp/jnitensorflow.cpp:14119:32: warning: 
      'JavaCPP_org_bytedeco_javacpp_tensorflow_00024FalseOpDefBuilderWrapper_00024Fn_1InferenceContext_allocate_callback' has C-linkage specified, but returns user-defined type
      '::tensorflow::Status' which is incompatible with C [-Wreturn-type-c-linkage]
JNIEXPORT ::tensorflow::Status JavaCPP_org_bytedeco_javacpp_tensorflow_00024FalseOpDefBuilderWrapper_00024Fn_1InferenceContext_allocate_callback(::tensorflow::shape_inference::Inf...
                               ^
/Users/aeberle/Documents/programming/java/dekra/javacpp-presets-clean/tensorflow/target/classes/org/bytedeco/javacpp/jnitensorflow.cpp:14831:32: warning: 
      'JavaCPP_org_bytedeco_javacpp_tensorflow_00024TrueOpDefBuilderWrapper_00024Fn_1InferenceContext_allocate_callback' has C-linkage specified, but returns user-defined type
      '::tensorflow::Status' which is incompatible with C [-Wreturn-type-c-linkage]
JNIEXPORT ::tensorflow::Status JavaCPP_org_bytedeco_javacpp_tensorflow_00024TrueOpDefBuilderWrapper_00024Fn_1InferenceContext_allocate_callback(::tensorflow::shape_inference::Infe...
                               ^
/Users/aeberle/Documents/programming/java/dekra/javacpp-presets-clean/tensorflow/target/classes/org/bytedeco/javacpp/jnitensorflow.cpp:16425:32: warning: 
      'JavaCPP_org_bytedeco_javacpp_tensorflow_00024OpDefBuilder_00024Fn_1InferenceContext_allocate_callback' has C-linkage specified, but returns user-defined type '::tensorflow::Status'
      which is incompatible with C [-Wreturn-type-c-linkage]
JNIEXPORT ::tensorflow::Status JavaCPP_org_bytedeco_javacpp_tensorflow_00024OpDefBuilder_00024Fn_1InferenceContext_allocate_callback(::tensorflow::shape_inference::InferenceContex...
                               ^
17 warnings generated.
ld: library not found for -ltensorflow
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Do you have any idea what I'm doing wrong? Is it working for you with a clean setup?

@mirosval
Copy link
Contributor Author

I think you need to do mvn install --projects .,tensorflow, not mvn install --projects .,tensorflow -Djavacpp.cppbuild.skip=true. You skipped the build, so your tensorflow lib was not built.

@andreas-eberle
Copy link
Contributor

andreas-eberle commented Sep 27, 2016

@mirosval: Sorry, that was a copy and paste failure. I actually ran it without the skip option (I updated my question). I just also tried to first manually run the cppbuild.sh script and skip that step in the maven process. Unfortunately that gave the same result. Any other ideas?

EDIT: I just retried it again to make sure I didn't use the wrong command line arguments. Still I have the same problems. The complete output can be found here: https://gist.github.com/andreas-eberle/51c0bb15641f3198ca00860981363452

@mirosval
Copy link
Contributor Author

I run both, cppbuild.sh and after that mvn install....

Clearly it looks like your tensorflow was not built, or it can not be found in that path.

I did come across a similar problem on Linux, where I had to change the path where bazel put header files.

The best I can do for you is share this gist that contains the Dockerfile I used to build the linux version of the project.

"tensorflow/cc/framework/ops.h",
"tensorflow/cc/framework/cc_op_gen.h",
"tensorflow_adapters.h"},
link = "tensorflow"),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mirosval: I think I found it. The build worked when I changed to link agains tensorflow_cc. I guess this is because you had to switch to build libtensorflow_cc instead of libtensorflow which it was in version 0.9.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, that needs to be changed. Thanks for pointing this out!

@saudet
Copy link
Member

saudet commented Sep 28, 2016

We need to change the versions in the pom.xml files, yes, sorry about that. I need to figure out a better way of dealing with this. I think I'll just start using a major version number for all pom.xml files on all master branches (like 1.3-SNAPSHOT) and when I need to do some minor release of a past version (say 1.2.x), I'll just do it as a branch.

Anyway, the build also works for me, but there are still some things to fix...

The ops header files are missing, at least these:

"tensorflow/cc/ops/const_op.h", "tensorflow/cc/ops/cc_op_gen.h", "tensorflow/cc/ops/array_ops.h",
"tensorflow/cc/ops/data_flow_ops.h", "tensorflow/cc/ops/image_ops.h", "tensorflow/cc/ops/io_ops.h",
"tensorflow/cc/ops/linalg_ops.h", "tensorflow/cc/ops/logging_ops.h", "tensorflow/cc/ops/math_ops.h",
"tensorflow/cc/ops/nn_ops.h", "tensorflow/cc/ops/parsing_ops.h", "tensorflow/cc/ops/random_ops.h",
"tensorflow/cc/ops/sparse_ops.h", "tensorflow/cc/ops/state_ops.h", "tensorflow/cc/ops/string_ops.h",
"tensorflow/cc/ops/training_ops.h", "tensorflow/cc/ops/user_ops.h"

And we probably don't need this:

.put(new Info("const_op.h").skip())
.put(new Info("math_ops.h").skip())
.put(new Info("array_ops.h").skip())

This doesn't appear to be used:

.put(new Info("tensorflow::Scope").pointerTypes("Scope"))
.put(new Info("std::vector<tensorflow::ops::Input>").pointerTypes("InputVector"))
.put(new Info("std::vector<tensorflow::ops::Input>::iterator").skip())
.put(new Info("std::vector<tensorflow::ops::Input>::const_iterator").skip())

This is normal behavior for JavaCPP:

// For some reason the #define this was in got parsed even though its #ifdef guard failed
// see "tensorflow/core/framework/selective_registration.h" for more details
.put(new Info("SHOULD_REGISTER_OP_GRADIENT").skip())

It will try to parse everything by default, because it usually works better that way. This is the way to fix this:

.put(new Info("SELECTIVE_REGISTRATION").define(false))

I'm afraid this will also skip the shape_inference_fn field:

.put(new Info("tensorflow::OpShapeInferenceFn").skip())

Something like this would be better:

.put(new Info("tensorflow::OpRegistrationData::shape_inference_fn")
        .javaText("@MemberSetter public native OpRegistrationData shape_inference_fn(@ByVal ShapeInferenceFn shape_inference_fn);"))

The rest seems good :) Thanks!

@mirosval
Copy link
Contributor Author

Seems that the ops are back and it compiled for me. So assuming you update the javacpp version in all your poms to 1.2.5-SNAPSHOT it should compile for you as well.

However all your other points, like the skipped headers and iterators, etc don't seem to work for me, I always run into issues trying to remove them.

@saudet
Copy link
Member

saudet commented Sep 29, 2016

Looks like const_op.h contains functions named Const that conflict with the new Const class, but they don't seem to be used anywhere anymore, so commenting that out solves this issue. I've patched a few other things: tensorflow_20160929_diff.txt
Looks good? Seems to work well enough like that for me.

@mirosval
Copy link
Contributor Author

Everything works after including your patch, so I think from my side we're good to go.

I have allowed edits from maintainers, so in case there are some other changes necessary you should be able to push directly into my master branch.

@Mistobaan
Copy link
Contributor

The Const, Cast and few other static import operation does not work anymore. The version of the tensorflow in the Readme should be updated to 0.10.0. Somewhere we have to enforce that the javacpp version MUST be 1.2.5 or greater.

saudet added a commit to bytedeco/javacpp that referenced this pull request Sep 30, 2016
@saudet
Copy link
Member

saudet commented Sep 30, 2016

@mirosval Actually the Const functions are used in the example_trainer.cc sample, so we need to put those back in. I've updated JavaCPP for that, and with these info, we can work around the name clashes:

.put(new Info("tensorflow::ops::Cast").cppTypes("class tensorflow::ops::Cast").pointerTypes("CastOp"))
.put(new Info("tensorflow::ops::Const").cppTypes("class tensorflow::ops::Const").pointerTypes("ConstOp"))

I didn't notice I had push access to your repo. Anyway, I'd like to get all those commits squashed, and it might as well be under your name. The following commands seem to work, but feel free to do it your way! Thanks

git reset 9947d3c861c98007acd67918f3206ad940de1bf3
git commit -a -m "Update for tensorflow 0.10.0"
git remote add upstream https://github.com/bytedeco/javacpp-presets/
git fetch upstream
git rebase upstream/master
git push --force

@Mistobaan Once this and a couple of other things are in, I'll be switching all versions to 1.3-SNAPSHOT, and of course update the README.md file after the next release, whenever that happens. Will also be working on the new mapping for Const and Cast later, but help would be welcome.

@Mistobaan
Copy link
Contributor

@saudet if you point me in the right direction on the work that needs to be done for Const & Cast I might be able to take a look at it.

@mirosval
Copy link
Contributor Author

@saudet I think you can set up the squashing directly on GitHub (see https://github.com/blog/2141-squash-your-commits)

I'm trying to put the Cast & Const back using your snippet, but I have run into an issue with DataType not being defined, despite 800 lines below in another method it gets correctly recognized and cast to int (it's an enum from core/framework/types.pb.h). It seems that with ConstOp and CastOp it doesn't get expanded for some reason from: @ByVal DataType dtype to @Cast("tensorflow::DataType") int dtype and then I get compilation error tensorflow.java:[14295,85] cannot find symbol symbol: class DataType location: class org.bytedeco.javacpp.tensorflow.ConstOp

I'm on vacation next week so I won't have time to look into this.

@saudet
Copy link
Member

saudet commented Oct 1, 2016

@mirosval Oh, I didn't realize GitHub had a squash option there now. Good to know. :) Let's try it out.
That error just means you forgot to install the latest SNAPSHOT of JavaCPP. It works fine.

@Mistobaan Thanks, will look into updating ExampleTrainer, see what needs to be done for that and we'll see.

@saudet saudet merged commit aec7255 into bytedeco:master Oct 1, 2016
@saudet
Copy link
Member

saudet commented Oct 2, 2016

@Mistobaan Done: dd4ffa7 The ops API got a bit uglier, so we might want to create nice wrappers for that, but anyway it works. Let me know if there is anything missing!

@Mistobaan
Copy link
Contributor

getting this error now:

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.3:compile (default-compile) on project tensorflow: Compilation failure: Compilation failure:
[ERROR] /home/fmilo/workspace/javacpp-presets/tensorflow/src/main/java/org/bytedeco/javacpp/tensorflow.java:[14391,85] cannot find symbol
[ERROR] symbol:   class DataType
[ERROR] location: class org.bytedeco.javacpp.tensorflow.ConstOp
[ERROR] /home/fmilo/workspace/javacpp-presets/tensorflow/src/main/java/org/bytedeco/javacpp/tensorflow.java:[14392,99] cannot find symbol
[ERROR] symbol:   class DataType
[ERROR] location: class org.bytedeco.javacpp.tensorflow.ConstOp
[ERROR] /home/fmilo/workspace/javacpp-presets/tensorflow/src/main/java/org/bytedeco/javacpp/tensorflow.java:[24354,67] cannot find symbol
[ERROR] symbol:   class DataType
[ERROR] location: class org.bytedeco.javacpp.tensorflow.CastOp
[ERROR] /home/fmilo/workspace/javacpp-presets/tensorflow/src/main/java/org/bytedeco/javacpp/tensorflow.java:[24355,82] cannot find symbol
[ERROR] symbol:   class DataType
[ERROR] location: class org.bytedeco.javacpp.tensorflow.CastOp
[ERROR] -> [Help 1]

@saudet
Copy link
Member

saudet commented Oct 7, 2016

@Mistobaan That just means you have an old version of JavaCPP somewhere. Please try again with the latest version on the master branch.

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

Successfully merging this pull request may close these issues.

6 participants