Giter Site home page Giter Site logo

Comments (19)

girving avatar girving commented on March 29, 2024 2

Although we may not pursue this ourselves, the internal formats used for communication (GraphDef, etc.) are all platform independent protobuf. Thus, it is possible to implement all or part of the tensorflow API in Java while preserving communication compatibility with the existing code. Since a Java version would likely be slower, one useful bit would be a pure inference layer that evaluates graphs but isn't necessarily able to build them; this would allow graphs built in Python and trained in Python / C++ on GPUs to be run from Java servers.

from tensorflow.

sheepdreamofandroids avatar sheepdreamofandroids commented on March 29, 2024

Since raw performance is one of the goals of this library I think that pure implementations don't make too much sense.
A prettier API on top of the generated interfaces would be nice though.

from tensorflow.

edblackburn avatar edblackburn commented on March 29, 2024

Is there a canonical / repeatable test suite, so language bindings can have a target and level of confidence? Is there a build server? Could there be a build server?

from tensorflow.

girving avatar girving commented on March 29, 2024

There's a testsuite with fairly good converge, but currently it's mostly Python with a few C++ tests. There's also a lot of functionality for building graphs that's currently Python only, in particular the automatic differentiation functionality, though that doesn't matter for evaluation of graphs in Java. There are plans to move this functionality into the underlying C++ in future, at which point Java SWIG bindings would be more useful for creating graphs.

If someone takes up the Java SWIG challenge, we'd be happy to accept it upstream pending review, etc., at which point it would be part of our continuous testing. The details of accepting contributions is in flux at the moment, but that will stabilize.

from tensorflow.

sirinath avatar sirinath commented on March 29, 2024

Also perhaps https://github.com/bytedeco/javacpp can be used to generate bindings.

from tensorflow.

kovasb avatar kovasb commented on March 29, 2024

@girving What aspect of automatic differentiation is not available from other languages? Is that just for defining new ops?

from tensorflow.

girving avatar girving commented on March 29, 2024

If you search for RegisterGradient in the python directory, you'll see all the places we define the gradients of various ops. The gradients are defined by Python code, so they aren't available from pure C++ as yet (we hope to change this at some point).

from tensorflow.

kovasb avatar kovasb commented on March 29, 2024

I don't fully grasp the architecture/order of operations, but could one populate the gradients using python, while still calling into the C++ code via a bridge?

Alternatively: Run the python code once to generate the gradients for every op, serialize all those gradients to a file, and then other runtimes can read them off and register them?

from tensorflow.

girving avatar girving commented on March 29, 2024

Both of those might work, but I don't know how much of a savings they are compared to doing it the right way and porting the code to C++.

from tensorflow.

kovasb avatar kovasb commented on March 29, 2024

I fully agree, just sounding out a temporary solution so I'm not blocked (I imagine it might be a while before all that code is ported)

from tensorflow.

sirinath avatar sirinath commented on March 29, 2024

If all the functionality is not available in the C++ core then porting will be very difficult and some cases not possible (with respect to a fully functional version). Also I opened this: #476

from tensorflow.

ieee8023 avatar ieee8023 commented on March 29, 2024

+1 for Java

from tensorflow.

junwucs avatar junwucs commented on March 29, 2024

+1 for java

from tensorflow.

FrankXia avatar FrankXia commented on March 29, 2024

+1 for Java.

from tensorflow.

stream-iori avatar stream-iori commented on March 29, 2024

+1 for Java

from tensorflow.

thammegowda avatar thammegowda commented on March 29, 2024

+1 for Java/Scala

from tensorflow.

solomatov avatar solomatov commented on March 29, 2024

+1

from tensorflow.

guotong1988 avatar guotong1988 commented on March 29, 2024

@girving I want to contribute to tensorflow java api,
I used to implement the PHP frontend of Apache Spark alone.
Where to start?

from tensorflow.

asimshankar avatar asimshankar commented on March 29, 2024

Closing this out as a duplicate of #5 and #18.

from tensorflow.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.