GitHunt
VO

volpato30/java-demo

PyTorch Java demo

PyTorch Java Demo

This repository is a demonstration of how to use PyTorch from Java.

Setup

Download and unpack libtorch nightly (or 1.4 or greater once it is released).
From the pytorch.org homepage under "Quick Start Locally",
make sure "LibTorch" is the selected package.
As of this writing, only Linux is supported. Mac and Windows will follow.

Change java.library.path in build.gradle to /path/to/libtorch/lib.

Run ./gradlew run to build and run the demo application.
It will load demo-model.pt and run it on some simple data.

More information about the Java API and TorchScript:

Contributors

Created January 13, 2020
Updated January 14, 2020
volpato30/java-demo | GitHunt