Class NetworkMemoryReport
- java.lang.Object
-
- org.deeplearning4j.nn.conf.memory.MemoryReport
-
- org.deeplearning4j.nn.conf.memory.NetworkMemoryReport
-
public class NetworkMemoryReport extends MemoryReport
-
-
Field Summary
-
Fields inherited from class org.deeplearning4j.nn.conf.memory.MemoryReport
CACHE_MODE_ALL_ZEROS
-
-
Constructor Summary
Constructors Constructor Description NetworkMemoryReport(@NonNull Map<String,MemoryReport> layerAndVertexReports, @NonNull Class<?> modelClass, String modelName, @NonNull InputType... networkInputTypes)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description longgetMemoryBytes(MemoryType memoryType, int minibatchSize, MemoryUseMode memoryUseMode, CacheMode cacheMode, DataType dataType)Get the memory estimate (in bytes) for the specified type of memoryStringgetName()Name of the object that the memory report was generated forClass<?>getReportClass()longgetTotalMemoryBytes(int minibatchSize, @NonNull MemoryUseMode memoryUseMode, @NonNull CacheMode cacheMode, @NonNull DataType dataType)Get the total memory use in bytes for the given configurationStringtoString()-
Methods inherited from class org.deeplearning4j.nn.conf.memory.MemoryReport
cacheModeMapFor, fromJson, fromYaml, getBytesPerElement, getMemoryBytes, getTotalMemoryBytes, toJson, toYaml
-
-
-
-
Method Detail
-
getReportClass
public Class<?> getReportClass()
- Specified by:
getReportClassin classMemoryReport- Returns:
- Class that the memory report was generated for
-
getName
public String getName()
Description copied from class:MemoryReportName of the object that the memory report was generated for- Specified by:
getNamein classMemoryReport- Returns:
- Name of the object
-
getTotalMemoryBytes
public long getTotalMemoryBytes(int minibatchSize, @NonNull @NonNull MemoryUseMode memoryUseMode, @NonNull @NonNull CacheMode cacheMode, @NonNull @NonNull DataType dataType)Description copied from class:MemoryReportGet the total memory use in bytes for the given configuration- Specified by:
getTotalMemoryBytesin classMemoryReport- Parameters:
minibatchSize- Mini batch size to estimate the memory formemoryUseMode- The memory use mode (training or inference)cacheMode- The CacheMode to usedataType- Nd4j datatype- Returns:
- The estimated total memory consumption in bytes
-
getMemoryBytes
public long getMemoryBytes(MemoryType memoryType, int minibatchSize, MemoryUseMode memoryUseMode, CacheMode cacheMode, DataType dataType)
Description copied from class:MemoryReportGet the memory estimate (in bytes) for the specified type of memory- Specified by:
getMemoryBytesin classMemoryReport- Parameters:
memoryType- Type of memory to get the estimate for invitesminibatchSize- Mini batch size to estimate the memory formemoryUseMode- The memory use mode (training or inference)cacheMode- The CacheMode to usedataType- Nd4j datatype- Returns:
- Estimated memory use for the given memory type
-
toString
public String toString()
- Specified by:
toStringin classMemoryReport
-
-