Import in to your favorite IDE
Ensure that you clone the deeplearning4j project locally.
git clone https://github.com/eclipse/deeplearning4j
Before importing the project, a few things of note no matter what IDE you use:
- 1.One submodule (libnd4j) is a c++ project that uses maven to invoke a cmake build. You may wish to edit libnd4j separately in a cmake oriented IDE like VS Code, Clion, or Eclipse c/c++. In order to build a particular nd4j backend, libnd4j should already be compiled. By default, relevant nd4j backends all look for a pre compiled libnd4j in the libnd4j directory included within the same project.
Once imported, please give the project time to download associated dependencies. You can verify the status of the project in the bottom right corner.
In order to enable the project to work, the following modifications need to be made.
Eclipse Deeplearning4j has a set of shaded modules. Shaded modules are artifacts that re namespace a dependency to a different location in order to use it as a set of private dependencies that do not clash with other libraries that may also share the dependency.
Intellij does not handle this very well. In order to work around this, you need to exclude all projects under the nd4j/nd4j-shade folder individually. Right click on each folder. Go to Maven -> Ignore Projects.
Assuming you follow the other steps above (lombok,libdn4j,..) then you should be able to run any module you want.
Once cloned locally, open eclipse. Please follow the guide here to import from external maven sources. Importing your project in to eclipse may take a while. Of note is due to the profile sensitive nature of the deeplearning4j suite, there maybe issues when opening and building the project.
When first finishing import of the project, a number of maven connector errors should be highlighted. Afterwards, just click resolve all later and finish. Let eclipse finish downloading sources and javadoc.
As of the latest version of eclipse, build errors may occur.