Appendix J. Troubleshooting DL4J Installations

If anything goes wrong when you attempt to run the examples, you’ll need to do some troubleshooting. In the following sections we discuss some of the common issues that new users of DL4J experience.

Previous Installation

If you have installed DL4J before and now see the examples throwing errors, please update your libraries. With Maven, just update the versions in your pom.xml file to match the latest versions on Maven Central. With source, you can run a git clone on ND4J, Canova, and DL4J, and a mvn clean install -Dskiptests=true -Dmaven.javadoc.skip=true within all three directories, in that order.

Memory Errors When Installing From Source

As the code base grows, installing from source requires more memory. If you encounter a Permgen error during the DL4J build, you might need to add more heap space. To do that, you’ll need to find and alter your hidden .bash_profile file, which adds environmental variables to bash. To see those variables, in the command line, type env. To add more heap space, in your console, type this command:

echo "export MAVEN_OPTS="-Xmx512m -XX:MaxPermSize=512m"" > ~/.bash_profile

Older Versions of Maven

Older versions of Maven, such as 3.0.4, are likely to throw exceptions like a NoSuchMethodError. You can fix this by upgrading to the latest version of Maven, which is currently 3.3.x. To check your Maven version, in the command line, type mvn -v.

Maven and PATH Variables

After installing Maven, you ...

Get Deep Learning now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.