deepjavalibrary / djl

Licence: Apache-2.0 license
An Engine-Agnostic Deep Learning Framework in Java

Programming Languages

java
68154 projects - #9 most used programming language
C++
36643 projects - #6 most used programming language
Jupyter Notebook
11667 projects
c
50402 projects - #5 most used programming language
HTML
75241 projects
python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to djl

Djl
An Engine-Agnostic Deep Learning Framework in Java
Stars: ✭ 2,262 (-26.56%)
Mutual labels:  mxnet, ml, autograd, onnxruntime, djl
vs-mlrt
Efficient ML Filter Runtimes for VapourSynth (with built-in support for waifu2x, DPIR, RealESRGANv2, and Real-CUGAN)
Stars: ✭ 34 (-98.9%)
Mutual labels:  ml, onnxruntime
Flashlight
A C++ standalone library for machine learning
Stars: ✭ 4,038 (+31.1%)
Mutual labels:  ml, autograd
Netron
Visualizer for neural network, deep learning, and machine learning models
Stars: ✭ 17,193 (+458.21%)
Mutual labels:  mxnet, ml
d2l-java
The Java implementation of Dive into Deep Learning (D2L.ai)
Stars: ✭ 94 (-96.95%)
Mutual labels:  mxnet, djl
Polyaxon
Machine Learning Platform for Kubernetes (MLOps tools for experimentation and automation)
Stars: ✭ 2,966 (-3.7%)
Mutual labels:  mxnet, ml
Onnx
Open standard for machine learning interoperability
Stars: ✭ 11,829 (+284.06%)
Mutual labels:  mxnet, ml
Fusenet
Deep fusion project of deeply-fused nets, and the study on the connection to ensembling
Stars: ✭ 230 (-92.53%)
Mutual labels:  mxnet
php-chess
A chess library for PHP.
Stars: ✭ 42 (-98.64%)
Mutual labels:  ml
Bmxnet V2
BMXNet 2: An Open-Source Binary Neural Network Implementation Based on MXNet
Stars: ✭ 199 (-93.54%)
Mutual labels:  mxnet
Thinc
🔮 A refreshing functional take on deep learning, compatible with your favorite libraries
Stars: ✭ 2,422 (-21.36%)
Mutual labels:  mxnet
XKT
Multiple Knowledge Tracing models implemented by mxnet
Stars: ✭ 14 (-99.55%)
Mutual labels:  mxnet
GIMLeT
GIMLeT – Gestural Interaction Machine Learning Toolkit
Stars: ✭ 33 (-98.93%)
Mutual labels:  ml
mindsdb native
Machine Learning in one line of code
Stars: ✭ 34 (-98.9%)
Mutual labels:  ml
hi-ml
HI-ML toolbox for deep learning for medical imaging and Azure integration
Stars: ✭ 150 (-95.13%)
Mutual labels:  ml
Arcface Multiplex Recognition
适用于复杂场景的人脸识别身份认证系统
Stars: ✭ 200 (-93.51%)
Mutual labels:  mxnet
Projects-Archive
This hacktober fest, the only stop you’ll need to make for ML, Web Dev and App Dev - see you there!
Stars: ✭ 21 (-99.32%)
Mutual labels:  ml
Gluon Nlp
NLP made easy
Stars: ✭ 2,344 (-23.9%)
Mutual labels:  mxnet
mindsdb server
MindsDB server allows you to consume and expose MindsDB workflows, through http.
Stars: ✭ 3 (-99.9%)
Mutual labels:  ml
mxnet-retrain
Create mxnet finetuner (retrain) for mac/linux ,no need install docker and supports CPU, GPU(eGpu/cudnn).support the inception,resnet ,squeeznet,mobilenet...
Stars: ✭ 32 (-98.96%)
Mutual labels:  mxnet

DeepJavaLibrary

Continuous Docs Nightly Publish

Deep Java Library (DJL)

Overview

Deep Java Library (DJL) is an open-source, high-level, engine-agnostic Java framework for deep learning. DJL is designed to be easy to get started with and simple to use for Java developers. DJL provides a native Java development experience and functions like any other regular Java library.

You don't have to be machine learning/deep learning expert to get started. You can use your existing Java expertise as an on-ramp to learn and use machine learning and deep learning. You can use your favorite IDE to build, train, and deploy your models. DJL makes it easy to integrate these models with your Java applications.

Because DJL is deep learning engine agnostic, you don't have to make a choice between engines when creating your projects. You can switch engines at any point. To ensure the best performance, DJL also provides automatic CPU/GPU choice based on hardware configuration.

DJL's ergonomic API interface is designed to guide you with best practices to accomplish deep learning tasks. The following pseudocode demonstrates running inference:

    // Assume user uses a pre-trained model from model zoo, they just need to load it
    Criteria<Image, Classifications> criteria =
            Criteria.builder()
                    .optApplication(Application.CV.OBJECT_DETECTION) // find object dection model
                    .setTypes(Image.class, Classifications.class)    // define input and output
                    .optFilter("backbone", "resnet50")               // choose network architecture
                    .build();

    Image img = ImageFactory.getInstance().fromUrl("http://...");    // read image
    try (ZooModel<Image, Classifications> model = criteria.loadModel();
         Predictor<Image, Classifications> predictor = model.newPredictor()) {
        Classifications result = predictor.predict(img);

        // get the classification and probability
        ...
    }

The following pseudocode demonstrates running training:

    // Construct your neural network with built-in blocks
    Block block = new Mlp(28 * 28, 10, new int[] {128, 64});

    Model model = Model.newInstance("mlp"); // Create an empty model
    model.setBlock(block);                  // set neural network to model

    // Get training and validation dataset (MNIST dataset)
    Dataset trainingSet = new Mnist.Builder().setUsage(Usage.TRAIN) ... .build();
    Dataset validateSet = new Mnist.Builder().setUsage(Usage.TEST) ... .build();

    // Setup training configurations, such as Initializer, Optimizer, Loss ...
    TrainingConfig config = setupTrainingConfig();
    Trainer trainer = model.newTrainer(config);
    /*
     * Configure input shape based on dataset to initialize the trainer.
     * 1st axis is batch axis, we can use 1 for initialization.
     * MNIST is 28x28 grayscale image and pre processed into 28 * 28 NDArray.
     */
    trainer.initialize(new Shape(1, 28 * 28));
    EasyTrain.fit(trainer, epoch, trainingSet, validateSet);

    // Save the model
    model.save(modelDir, "mlp");

    // Close the resources
    trainer.close();
    model.close();

Getting Started

Resources

Release Notes

The release of DJL 0.21.0 is planned for January or February 2022.

Building From Source

To build from source, begin by checking out the code. Once you have checked out the code locally, you can build it as follows using Gradle:

# for Linux/macOS:
./gradlew build

# for Windows:
gradlew build

To increase build speed, you can use the following command to skip unit tests:

# for Linux/macOS:
./gradlew build -x test

# for Windows:
gradlew build -x test

Importing into eclipse

to import source project into eclipse

# for Linux/macOS:
./gradlew eclipse


# for Windows:
gradlew eclipse

in eclipse

file->import->gradle->existing gradle project

Note: please set your workspace text encoding setting to UTF-8

Community

You can read our guide to community forums, following DJL, issues, discussions, and RFCs to figure out the best way to share and find content from the DJL community.

Join our slack channel to get in touch with the development team, for questions and discussions.

Follow our twitter to see updates about new content, features, and releases.

关注我们 知乎专栏 获取DJL最新的内容!

Useful Links

License

This project is licensed under the Apache-2.0 License.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].