Package adams.data.djl
Class DJLUtils
- java.lang.Object
-
- adams.data.djl.DJLUtils
-
public class DJLUtils extends Object
Utility functions for DJL.- Author:
- fracpete (fracpete at waikato dot ac dot nz)
-
-
Field Summary
Fields Modifier and Type Field Description static StringDJL_RANDOM_SEEDthe environment variable to set the global random seed.
-
Constructor Summary
Constructors Constructor Description DJLUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static intgetPyTorchSeed()Returns the random seed used by the PyTorch engine.static voidregisterPytorch()Registers the Pytorch engine.static voidsetPyTorchSeed(int seed)Sets the random seed to use for the PyTorch engine.
-
-
-
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
-
-
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.
-
-