DJL Live Demos

Experience Java to solve your DL problem in a simple way.

Use online JShell to try out NDArray

var array = manager.ones(new Shape(1,3,2)) to create a NDArray with shape 1,3,2

var array = manager.randomUniform(0, 1, new Shape(1, 1, 4)) to create a random uniform NDArray

NDArray nd = manager.arange(1, 10).reshape(3, 3) to create a NDArray and reshape to 3x3

nd = nd.transpose() to transpose the NDArray

nd = nd.add(10) add 10 to final result

NDArray nd = manager.arange(5, 14) to create a NDArray from 5 to 14

nd = nd.get(nd.gte(10)) filter the value that are >=10

NDArray nd = manager.arange(1, 10).reshape(3, 3) to create a NDArray with shape 3x3

nd.set(new NDIndex(":, 1"), array -> array.mul(2)); Multiply the second column value by 2

type nd to show the result

To learn more about NDArray and its methods, please checkout our NDArray javadoc.

Try with Doodle Draw

Live inference with AWS Lambda

DJL Block Runner

Test the code, Download the template, Run it locally.

  • filter_dramaRun Inference with DJL

    You can copy with the code snippet above to run inference with MXNet. You can also try to change the Model URL to run inference on PyTorch and TensorFlow:

    PyTorch: Please select PyTorch in the engine selection dropdown and uncomment the second modelUrl.

    TensorFlow: Please select TensorFlow in the engine selection dropdown and uncomment the third modelUrl.

    Use Get Template to test the code in your local machine.

Output