Deep learning Java library
As we’ve heard probably there is a ML toolkit based on Java, - DL4J from Eclipse. But now we have another one library for ML on Java from AWS team. And it’s good.
I can watch endlessly dancing graphs. But let’s see, what we have.
Amazon released Deep Java Library, an open-source library for training, testing, deploying, and making predictions with deep-learning models.
There are jupyter’s notebooks here. Maven:
<!-- https://mvnrepository.com/artifact/ai.djl.mxnet/mxnet-engine -->
<dependency>
<groupId>ai.djl.mxnet</groupId>
<artifactId>mxnet-engine</artifactId>
<version>0.2.0</version>
</dependency>
Deep Java Library supports training on multiple GPUs.
TrainingConfig config = new DefaultTrainingConfig(initializer, loss)
.setOptimizer(optimizer)
.setBatchSize(batchSize)
.setDevices(Device.getDevices(1))
.addEvaluator(accuracy);
We can use setDevices and pass an array of devices we want the model to be trained on. For example, new Device[]{Device.gpu(0), Device.gpu(1)} for training on GPU0 and GPU1.