Class DJLUtils


  • public class DJLUtils
    extends Object
    Utility functions for DJL.
    Author:
    fracpete (fracpete at waikato dot ac dot nz)
    • Field Detail

      • DJL_RANDOM_SEED

        public static final String DJL_RANDOM_SEED
        the environment variable to set the global random seed.
        See Also:
        Constant Field Values
    • Constructor Detail

      • DJLUtils

        public DJLUtils()
    • Method Detail

      • setPyTorchSeed

        public static void setPyTorchSeed​(int seed)
        Sets the random seed to use for the PyTorch engine.
        Parameters:
        seed - the seed
      • getPyTorchSeed

        public static int getPyTorchSeed()
        Returns the random seed used by the PyTorch engine.
        Returns:
        the seed
      • registerPytorch

        public static void registerPytorch()
        Registers the Pytorch engine.