How to do it...

  1. Download and install CUDA v9.2+ from the NVIDIA developer website URL: https://developer.nvidia.com/cuda-downloads.
  2. Configure the CUDA dependencies. For Linux, go to a Terminal and edit the .bashrc file. Run the following commands and make sure you replace username and the CUDA version number as per your downloaded version:
nano /home/username/.bashrc
export PATH=/usr/local/cuda-9.2/bin${PATH:+:${PATH}}$

export LD_LIBRARY_PATH=/usr/local/cuda-9.2/lib64${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}

source .bashrc

  1. Add the lib64 directory to PATH for older DL4J versions.
  2. Run the nvcc --version command to verify the CUDA installation.
  3. Add Maven dependencies for the ND4J CUDA backend:
<dependency>
<groupId>org.nd4j</groupId>
<artifactId>nd4j-cuda-9.2</artifactId>
<version>1.0.0-beta3</version>
</dependency>
  1. Add the DL4J CUDA Maven dependency:
<dependency>
<groupId>org.deeplearning4j</groupId>
<artifactId>deeplearning4j-cuda-9.2</artifactId>
<version>1.0.0-beta3</version>
</dependency>
  1. Add cuDNN dependencies to use bundled CUDA and cuDNN:
<dependency>
<groupId>org.bytedeco.javacpp-presets</groupId>
<artifactId>cuda</artifactId>
<version>9.2-7.1-1.4.2</version>
<classifier>linux-x86_64-redist</classifier> //system specific
</dependency>
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset