Class LayerMemoryReport

    • Method Detail

      • getReportClass

        public Class<?> getReportClass()
        Specified by:
        getReportClass in class MemoryReport
        Returns:
        Class that the memory report was generated for
      • getName

        public String getName()
        Description copied from class: MemoryReport
        Name of the object that the memory report was generated for
        Specified by:
        getName in class MemoryReport
        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: MemoryReport
        Get the total memory use in bytes for the given configuration
        Specified by:
        getTotalMemoryBytes in class MemoryReport
        Parameters:
        minibatchSize - Mini batch size to estimate the memory for
        memoryUseMode - The memory use mode (training or inference)
        cacheMode - The CacheMode to use
        dataType - 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: MemoryReport
        Get the memory estimate (in bytes) for the specified type of memory
        Specified by:
        getMemoryBytes in class MemoryReport
        Parameters:
        memoryType - Type of memory to get the estimate for invites
        minibatchSize - Mini batch size to estimate the memory for
        memoryUseMode - The memory use mode (training or inference)
        cacheMode - The CacheMode to use
        dataType - Nd4j datatype
        Returns:
        Estimated memory use for the given memory type
      • 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