deepjavalibrary/djl has 4,861 GitHub stars and 761 forks. GitHot measured 0 stars in 24 hours and +3 in 7 days. Last checked 2026-11-08 14:43 UTC. Last push 2026-10-29.
Java용 엔진 독립적 딥러닝 프레임워크
측정된 스타 증가
- in 24h
- 0
- in 7 days
- +3
- in 15 days
- 기록 수집 중
- in 1 month
- 기록 수집 중
서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.
README.md
Original
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 detection 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
- 0.39.0 (Code)
- 0.38.0 (Code)
- 0.37.0 (Code)
- 0.36.0 (Code)
- 0.35.1 (Code)
- 0.34.0 (Code)
- 0.33.0 (Code)
- +32 releases
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
X (formerly Twitter) to see updates about new content, features, and releases.
关注我们 知乎专栏 获取DJL最新的内容!
Useful Links
License
This project is licensed under the Apache-2.0 License.
관련 프로젝트 살펴보기
tensorflow/tensorflow
모두를 위한 오픈소스 머신러닝 프레임워크
201,388 스타huggingface/transformers
🤗 Transformers: 텍스트, 비전, 오디오, 멀티모달 분야의 최첨단 머신러닝 모델을 위한 모델 정의 프레임워크로, 추론과 학습을 모두 지원합니다.
168,636 스타AUTOMATIC1111/stable-diffusion-webui
Stable Diffusion 웹 UI
165,251 스타Comfy-Org/ComfyUI
그래프와 노드로 구성된 인터페이스를 갖춘, 가장 강력하고 모듈성이 뛰어난 확산 모델 GUI, API, 백엔드입니다. 세계에서 가장 빠른 로컬 추론 엔진입니다.
145,629 스타