Class CrashReportingUtil


  • public class CrashReportingUtil
    extends Object
    • Method Detail

      • crashDumpsEnabled

        public static void crashDumpsEnabled​(boolean enabled)
        Method that can be used to enable or disable memory crash reporting. Memory crash reporting is enabled by default.
      • crashDumpOutputDirectory

        public static void crashDumpOutputDirectory​(File rootDir)
        Method that can be use to customize the output directory for memory crash reporting. By default, the current working directory will be used.
        Parameters:
        rootDir - Root directory to use for crash reporting. If null is passed, the current working directory will be used
      • writeMemoryCrashDump

        public static void writeMemoryCrashDump​(@NonNull
                                                @NonNull Model net,
                                                @NonNull
                                                @NonNull Throwable e)
        Generate and write the crash dump to the crash dump root directory (by default, the working directory). Naming convention for crash dump files: "dl4j-memory-crash-dump-_.txt"
        Parameters:
        net - Net to generate the crash dump for. May not be null
        e - Throwable/exception. Stack trace will be included in the network output
      • generateMemoryStatus

        public static String generateMemoryStatus​(Model net,
                                                  int minibatch,
                                                  InputType... inputTypes)
        Generate memory/system report as a String, for the specified network. Includes informatioun about the system, memory configuration, network, etc.
        Parameters:
        net - Net to generate the report for
        Returns:
        Report as a String