public class NetworkMemoryReport extends MemoryReport
MultiLayerNetwork
or ComputationGraph
,
composed of multiple layers and/or vertices.CACHE_MODE_ALL_ZEROS
Constructor and Description |
---|
NetworkMemoryReport(java.util.Map<java.lang.String,MemoryReport> layerAndVertexReports,
java.lang.Class<?> modelClass,
java.lang.String modelName,
InputType... networkInputTypes) |
Modifier and Type | Method and Description |
---|---|
long |
getMemoryBytes(MemoryType memoryType,
int minibatchSize,
MemoryUseMode memoryUseMode,
CacheMode cacheMode,
DataBuffer.Type dataType)
Get the memory estimate (in bytes) for the specified type of memory
|
java.lang.String |
getName()
Name of the object that the memory report was generated for
|
java.lang.Class<?> |
getReportClass() |
long |
getTotalMemoryBytes(int minibatchSize,
MemoryUseMode memoryUseMode,
CacheMode cacheMode,
DataBuffer.Type dataType)
Get the total memory use in bytes for the given configuration
|
java.lang.String |
toString() |
cacheModeMapFor, fromJson, fromYaml, getBytesPerElement, getMemoryBytes, getTotalMemoryBytes, toJson, toYaml
public NetworkMemoryReport(@NonNull java.util.Map<java.lang.String,MemoryReport> layerAndVertexReports, @NonNull java.lang.Class<?> modelClass, java.lang.String modelName, @NonNull InputType... networkInputTypes)
public java.lang.Class<?> getReportClass()
getReportClass
in class MemoryReport
public java.lang.String getName()
MemoryReport
getName
in class MemoryReport
public long getTotalMemoryBytes(int minibatchSize, @NonNull MemoryUseMode memoryUseMode, @NonNull CacheMode cacheMode, @NonNull DataBuffer.Type dataType)
MemoryReport
getTotalMemoryBytes
in class MemoryReport
minibatchSize
- Mini batch size to estimate the memory formemoryUseMode
- The memory use mode (training or inference)cacheMode
- The CacheMode to usedataType
- Nd4j datatypepublic long getMemoryBytes(MemoryType memoryType, int minibatchSize, MemoryUseMode memoryUseMode, CacheMode cacheMode, DataBuffer.Type dataType)
MemoryReport
getMemoryBytes
in class MemoryReport
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 datatypepublic java.lang.String toString()
toString
in class MemoryReport