MXNet native library

MXNet Engine native library binary distribution

License

License

Categories

Categories

Net DJL Business Logic Libraries Machine Learning Native Development Tools
GroupId

GroupId

ai.djl.mxnet
ArtifactId

ArtifactId

mxnet-native-cu92mkl
Last Version

Last Version

1.7.0-b
Release Date

Release Date

Type

Type

jar
Description

Description

MXNet native library
MXNet Engine native library binary distribution
Source Code Management

Source Code Management

https://github.com/awslabs/djl

Download mxnet-native-cu92mkl

How to add to project

<!-- https://jarcasting.com/artifacts/ai.djl.mxnet/mxnet-native-cu92mkl/ -->
<dependency>
    <groupId>ai.djl.mxnet</groupId>
    <artifactId>mxnet-native-cu92mkl</artifactId>
    <version>1.7.0-b</version>
</dependency>
// https://jarcasting.com/artifacts/ai.djl.mxnet/mxnet-native-cu92mkl/
implementation 'ai.djl.mxnet:mxnet-native-cu92mkl:1.7.0-b'
// https://jarcasting.com/artifacts/ai.djl.mxnet/mxnet-native-cu92mkl/
implementation ("ai.djl.mxnet:mxnet-native-cu92mkl:1.7.0-b")
'ai.djl.mxnet:mxnet-native-cu92mkl:jar:1.7.0-b'
<dependency org="ai.djl.mxnet" name="mxnet-native-cu92mkl" rev="1.7.0-b">
  <artifact name="mxnet-native-cu92mkl" type="jar" />
</dependency>
@Grapes(
@Grab(group='ai.djl.mxnet', module='mxnet-native-cu92mkl', version='1.7.0-b')
)
libraryDependencies += "ai.djl.mxnet" % "mxnet-native-cu92mkl" % "1.7.0-b"
[ai.djl.mxnet/mxnet-native-cu92mkl "1.7.0-b"]

Dependencies

There are no dependencies for this project. It is a standalone project that does not depend on any other jars.

Project Modules

There are no modules declared in this project.

DeepJavaLibrary

Continuous PyTorch Continuous Tensorflow Docs

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();

    try (ZooModel<Image, Classifications> model = ModelZoo.loadModel(criteria)) {
        try (Predictor<Image, Classifications> predictor = model.newPredictor()) {
            Image img = ImageFactory.getInstance().fromUrl("http://..."); // read image
            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);

    try (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();
        try (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.
             */
            Shape inputShape = new Shape(1, 28 * 28);
            trainer.initialize(new Shape[] {inputShape});

            EasyTrain.fit(trainer, epoch, trainingSet, validateSet);
        }

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

Getting Started

Resources

Release Notes

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

Note: SpotBugs is not compatible with JDK 11+. SpotBugs will not be executed if you are using JDK 11+.

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最新的内容!

License

This project is licensed under the Apache-2.0 License.

ai.djl.mxnet

Amazon Web Services - Labs

AWS Labs

Versions

Version
1.7.0-b
1.7.0-a
1.6.0-b
1.6.0