Eclipse Deeplearning4j

Incorporating Artificial Intelligence Into Real-World Applications

The goal of the Eclipse Deeplearning4j project is simple: To enable artificial intelligence (AI) applications to run everywhere, for everyone. We’re working to take deep learning and AI applications out of the theoretical, academic world and into the real world where they can be applied in useful and meaningful ways across industries.

With the suite of tools we’ve made available in the Deeplearning4j project, enterprise developers can apply deep learning technology in a way that addresses the technical and business challenges in their industry.

Research Versus Reality

One of the major challenges in the deep learning field today is that when researchers speak publicly about deep learning frameworks, 90 percent of the time, they’re talking to other researchers about what they know and what they think is most interesting. They’re not talking to enterprise developers about how the technology can be applied to solve their real-world problems.

The media picks up on researchers’ ideas and the industry gets left behind. Most of the information people learn about AI through the media is exaggerated. And, it doesn’t fit with what industry actually needs.

The reality is that most developers have basic use cases and they’re using deep learning models that are two to five years old. And, only a very few leading-edge companies take a deep learning research paper and deploy the technology and capabilities it describes.

Targeting Enterprise Developer Challenges

The Deeplearning4j toolset is for traditional enterprise developers who just want to deploy a simple deep learning model in industries such as banking, retail, manufacturing, ecommerce, and others. To meet enterprise developers’ real-world requirements, we’ve created a decentralized, open, and vendor-neutral ecosystem that targets their need to:

  • Run AI applications on architectures that most people typically wouldn’t have access to, such as alternative accelerators
  • Take advantage of Java-based microservices architectures such as Eclipse MicroProfile
  • Enable AI application deployments at the network edge
  • Run AI applications on application servers such as WildFly and other products in the Jakarta EE ecosystem
  • Support the deployment needs of global markets with a wide range of use cases
  • Run AI applications on a mix of power-efficient chip types that are outside the mainstream NVIDIA and Intel options with no restrictions
  • Interoperate with existing and new deep learning frameworks
  • Write code in a variety of languages — Java, Scala, Python, Swift, and others
  • Integrate with legacy file formats and protocols

Key Project Components

Here’s a brief summary of some of the key components in the Eclipse Deeplearning4j toolset:

  • SameDiff is our version of TensorFlow or PyTorch. It’s a neutral runtime that allows developers to build and train deep learning models no matter which research framework they’re using. It can import TensorFlow models and run most existing TensorFlow models. It also interoperates with PyTorch. As a result, it makes a great starting point for building models.
  • DataVec is our data extract, transform, load (ETL) library. DataVec vectorizes and “tensorizes” data in spreadsheets, images, and other data sources that can’t be included in deep learning applications in their original format. Once transformed, the data is output in n-dimensional arrays.
  • Arbiter is our hyperparameter optimization component. Arbiter uses grid searches, random searches, and Bayesian methods to automatically tune the neural network, allowing developers to automatically build the optimal deep learning model for the data provided.
  • RL4J is our reinforcement learning library. It runs on top of Deeplearning4j and gives developers the ability to run reinforcement learning applications.

We also have:

  • A set of lower-level C++ libraries that are optimized and pre-compiled for different architectures to enable multi-language support
  • A component that allows developers to distribute training and batch inferences on Apache Spark
  • Two Scala libraries

Opening up the Deep Learning Ecosystem

When you read our component descriptions and visit the Deeplearning4j website, you’ll notice that interoperability among frameworks, technologies, and languages is a common theme. Today, there’s a huge misconception that all of the different framework developers and ecosystem players in the deep learning field are more interested in competing than cooperating.

But, it’s not a binary reality. There are different use cases and different ways to deploy deep learning models. Competition is good because without it, you simply have an echo chamber with only very narrow use cases being served and no alternative ideas. However, vendor-specific implementations typically do not interoperate well with one another.

That’s why it’s so important that the Deeplearning4j SameDiff component can import, read, write, and train models in the same way as TensorFlow and PyTorch. SameDiff complements TensorFlow and PyTorch, but also provides access to a broader community.

When new standards come out, we plan to support them so we can become the Switzerland of deep learning and offer a viable alternative for deep learning that isn’t marketed by one company or another.

The Eclipse Foundation Is the Ideal Place to Achieve Our Goals

Because we believe so strongly in the value of community development, openness, and interoperability, the Eclipse Foundation is the best place to achieve the deep learning advances listed above.

At the Eclipse Foundation, different people with different perspectives can contribute to the overall progress of projects, advancing technology and adoption faster. Everyone has a voice, governance is better and it’s vendor-neutral. There’s much greater opportunity to develop a diverse set of deep learning use cases and a more diverse ecosystem that will strengthen the long-term health of the technology. While the Deeplearning4j project is not currently associated with an Eclipse Foundation working group, we hope it will be in the future.

Code Is Ready for Use

Most of the Deeplearning4j code has been in production for several years at a number of different companies. The SameDiff component will be added to the project in January 2020, but developers are already using it and examples are available.

Going forward, SameDiff will be the main interface for building models and the Deeplearning4j interface that most people know will be supported as a higher-level API. We’ll also be focusing on further stabilizing the project components and on multi-language support end-to-end. And, we’re hoping to rework our ETL library to better integrate with lower-level math libraries and optimize the math end-to-end. You will also see more examples become available.

Get Started Today

If you have a use case, consider giving SameDiff a try. Or, you can download a pre-trained model from the PyTorch or TensorFlow ecosystem and use that as the starting point to build models with SameDiff. If you want to do ETL, use DataVec with either SameDiff or Deeplearning4j.

For examples, tutorials, documentation, and details about the community support that’s available, visit our website.

To receive the latest updates about Deeplearning4j and get in touch with our members, visit our mailing list page.

Finally, please consider taking our survey to help us better understand how deep learning is used in the Java ecosystem.

About the Author

Adam Gibson

Adam Gibson

CTO at Konduit