Skip to Main Content
Hands-On Deep Learning with Apache Spark
book

Hands-On Deep Learning with Apache Spark

by Guglielmo Iozzia
January 2019
Intermediate to advanced content levelIntermediate to advanced
322 pages
7h 29m
English
Packt Publishing
Content preview from Hands-On Deep Learning with Apache Spark

Memory management

In Chapter 7, Training Neural Networks with Spark, in the Performance considerations section, we learned how DL4J handles memory when training or running a model. Because it relies on ND4J, it also utilizes off-heap memory and not only heap memory. Being off-heap, it means that it is outside the scope managed by the JVM's Garbage Collection (GC) mechanism (the memory is allocated outside the JVM). At the JVM level, there are only pointers to off-heap memory locations; they can be passed to the C++ code via the Java Native Interface (JNI, https://docs.oracle.com/javase/8/docs/technotes/guides/jni/spec/jniTOC.html) for use in ND4J operations.

In DL4J, it is possible to manage memory allocations using two different approaches: ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Next-Generation Machine Learning with Spark: Covers XGBoost, LightGBM, Spark NLP, Distributed Deep Learning with Keras, and More

Next-Generation Machine Learning with Spark: Covers XGBoost, LightGBM, Spark NLP, Distributed Deep Learning with Keras, and More

Butch Quinto
Apache Spark Deep Learning Cookbook

Apache Spark Deep Learning Cookbook

Ahmed Sherif, Amrith Ravindra, Michal Malohlava, Adnan Masood

Publisher Resources

ISBN: 9781788994613Supplemental Content