Class LayerMemoryReport
- java.lang.Object
-
- org.deeplearning4j.nn.conf.memory.MemoryReport
-
- org.deeplearning4j.nn.conf.memory.LayerMemoryReport
-
public class LayerMemoryReport extends MemoryReport
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classLayerMemoryReport.Builder
-
Field Summary
-
Fields inherited from class org.deeplearning4j.nn.conf.memory.MemoryReport
CACHE_MODE_ALL_ZEROS
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedLayerMemoryReport(LayerMemoryReport.Builder b)
-
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 configurationvoidscale(int scale)Multiply all memory usage by the specified scaling factorStringtoString()-
Methods inherited from class org.deeplearning4j.nn.conf.memory.MemoryReport
cacheModeMapFor, fromJson, fromYaml, getBytesPerElement, getMemoryBytes, getTotalMemoryBytes, toJson, toYaml
-
-
-
-
Constructor Detail
-
LayerMemoryReport
protected LayerMemoryReport(LayerMemoryReport.Builder b)
-
-
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
-
scale
public void scale(int scale)
Multiply all memory usage by the specified scaling factor- Parameters:
scale- Scale factor to multiply all memory usage by
-
-