Switch branches/tags 4ap_buildlocally_mvn JT_caffe_RC1 ab_dataoffset_conflictFix ab_graphrefactor ab_samediff_dtypes ab_samediff_exec ab_spark_async2 ab_spark_debug_logging ab_updateraggregation_rebased ab_4912_cudnn_batchnorm ab_5152_batchnorm ag_fix_actor_shutdown batchnorm bpark_addtnal_commits bugfix/ci bugfix/tests-nd4j-parameter-server-node crockpot_cifar crockpot_docfix crockpot_imgfix crockpot_mobilenet crockpot_overhaul crockpot_quickstart dck_timeDistributed dh_3270_ds_parallel doc2vecprediction dropout dropoutchange earlystoppingwarning enforcescalaversions eraly_modelimport feature/add-ci-for-nd4s feature/monorepo folderrefactoring fr_ad_fix fr_npz gh-pages gradientupdates hadoop hostprovisioner intropro072-01 intropro072-02 intropro081 jp_cli_work keunwoochoi-gh-pages localfile master_pre_mono_repo master model_loading mp_add_e2e_tests mp_deepmoji mp_docs_masking mp_flatten_issue mp_gru mp_issue_6218 mp_merge_modes_import_earlybirdN mp_simple_rnn mp_squeezenet mp_update_keras_progress mp_upsampling_1d mp_vgg16 mp_weight_bug mw_cnn_gradient_check mw_cudnn mw_fix_defaultparaminit mw_fix_loader mw_gen_review mw_reviewbn mw_score mw_snapshot_branch ncleaver-patch-1 nd4jcast nd4jtensorflowinterop nearestneighbor newuicomponents newupdaters optimizer_part_2 outputlayerbackprop prtest purgecpu r119_broadcast r119_broadcast2 r119_cuda_ops r119_cuda r119_debug r119_dtypes_s r119_dtypes_syntaxnet r119_dtypes_z r119_eraly r119_evaluative r119_few_tweaks r119_fixes r119_justin_debug r119_node2vec r119_spark r119_vptree_build release/1.0.0-alpha release/1.0.0-beta release/1.0.0-beta2 release/1.0.0-beta3 revert-2219-master revert-2677-kor-fix revert-3272-dh_3270_ds_parallel revert-3433-averageaucforbinary revert-4205-gh-pages row_col sa_cudnnpage sa_fetchers sa_keras_0.8.0-1 sa_keras_0.8.0-2 sa_mkldnn sa_release sd-cli seraly serialization serializationordering shugeo_broadcast_test shugeo_compress shugeo_dropout_bp shugeo_intopk_fix shugeo_log_matrix_determinant shugeo_multimmul shugeo_ops2 shugeo_rng shugeo_trunk_norm_di shyrma_cuda shyrma_grad shyrma_reduce_shape shyrma_rnn_bp test-resources transitivescala treo-deprecate-netsaver-loader-utils uibranch unit-tests upd-version-in-mavencentral updaterupdate word2vec-gui word2vecmemoryimprovements
Nothing to show
Find file History
Latest commit b50b923 Dec 13, 2018


ND4J: Scientific Computing on the JVM

Join the chat at https://gitter.im/deeplearning4j/deeplearning4j Maven Central Javadoc

ND4J is an Apache 2.0-licensed scientific computing library for the JVM. By contributing code to this repository, you agree to make your contribution available under an Apache 2.0 license.

It is meant to be used in production environments rather than as a research tool, which means routines are designed to run fast with minimum RAM requirements.

Please search for the latest version on search.maven.org.

Or use the versions displayed in: https://github.com/deeplearning4j/dl4j-0.4-examples/blob/master/pom.xml

Main Features

  • Versatile n-dimensional array object
  • Multiplatform functionality including GPUs
  • Linear algebra and signal processing functions


  • Supports GPUs via with the CUDA backend nd4j-cuda-7.5 and Native via nd4j-native.
  • All of this is wrapped in a unifying interface.
  • The API mimics the semantics of Numpy, Matlab and scikit-learn.


Several of these modules are different backend options for ND4J (including GPUs).

  • api = core
  • instrumentation
  • jdbc = Java Database Connectivity
  • jocl-parent = Java bindings for OpenCL
  • scala-api = API for Scala users
  • scala-notebook = Integration with Scala Notebook

Building Specific Modules

It is possible to build the project without the native bindings. This can be done by specic targeting of the project to build.

mvn clean package test -pl :nd4j-api


Documentation is available at nd4j.org. Access the JavaDocs for more detail.


To install ND4J, there are a couple of approaches, and more information can be found on the ND4J website.

Install from Maven Central

  1. Search for nd4j in the Maven Central Repository to find the available nd4j jars.
  2. Include the appropriate dependency in your pom.xml.

Clone from the GitHub Repo



  1. Check for open issues, or open a new issue to start a discussion around a feature idea or a bug.

  2. If you feel uncomfortable or uncertain about an issue or your changes, feel free to contact us on Gitter using the link above.

  3. Fork the repository on GitHub to start making your changes to the master branch (or branch off of it).

  4. Write a test, which shows that the bug was fixed or that the feature works as expected.

  5. Note the repository follows the Google Java style with two modifications: 120-char column wrap and 4-spaces indentation. You can format your code to this format by typing mvn formatter:format in the subproject you work on, by using the contrib/formatter.xml at the root of the repository to configure the Eclipse formatter, or by using the INtellij plugin.

  6. Send a pull request, and bug us on Gitter until it gets merged and published.