• Weka 3.8.1 or above (here)
  • WekaDeeplearning4j package latest version (here)
  • Java 8 or above

You need to unzip the Weka zip file to a directory of your choice.


For the package no further requisites are necessary.


The GPU additions needs the CUDA 8.0, 9.0 or 9.2 backend with the appropriate cuDNN library to be installed on your system. Nvidia provides some good installation instructions for all platforms:

Installing the Weka Package

Weka packages can be easily installed either via the user interface as described here, or simply via the commandline:

$ java -cp <WEKA-JAR-PATH> weka.core.WekaPackageManager \
       -install-package <PACKAGE-ZIP>

where <WEKA-JAR-PATH> must be replaced by the path pointing to the Weka jar file, and <PACKAGE-ZIP> is the wekaDeeplearning4j package zip file.

You can check whether the installation was successful with

$ java -cp <WEKA-JAR-PATH> weka.core.WekaPackageManager \
       -list-packages installed

which results in

Installed   Repository  Loaded  Package
=========   ==========  ======  =======
1.5.6       -----       Yes     <PACKAGE>: Weka wrappers for Deeplearning4j

Add GPU Support

To add GPU support, download and run the latest for Linux/Macosx or install-cuda-libs.ps1 for Windows. Make sure CUDA is installed on your system as explained here.

The install script automatically downloads the libraries and copies them into your wekaDeeplearning4j package installation. If you want to download the library zip yourself, choose the appropriate combination of your platform and CUDA version from the latest release and point the installation script to the file, e.g.:

./ ~/Downloads/

Using wekaDeeplearning4j in a Maven Project

It is also possible to include this package as maven project. As of now it is not provided in any maven repository, therefore you need to install this package to your local .m2 repository:

$ git clone
$ cd wekaDeeplearning4j
$ ./gradlew build -x test publishToMavenLocal

or, if you want the cuda version:

$ ./gradlew build -x test publishToMavenLocal -Dcuda=<CUDA-VERSION> # Replace <CUDA-VERSION> with either "8.0", "9.0" or "9.2"

Now you can add the maven dependency in your pom.xml file