Package ai.djl.pytorch.jni
Class IValueUtils
- java.lang.Object
-
- ai.djl.pytorch.jni.IValueUtils
-
public final class IValueUtils extends java.lang.Object
IValueUtils is utility class to deal with IValue in PyTorch.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static ai.djl.ndarray.NDList
forward(PtSymbolBlock block, ai.djl.ndarray.NDList inputs, boolean isTrain)
Runs the forward of PyTorch module.static IValue
forward(PtSymbolBlock block, IValue... inputs)
Runs the forward of PyTorch module.
-
-
-
Method Detail
-
forward
public static ai.djl.ndarray.NDList forward(PtSymbolBlock block, ai.djl.ndarray.NDList inputs, boolean isTrain)
Runs the forward of PyTorch module.- Parameters:
block
- the block that contains PyTorch moduleinputs
- the inputNDList
isTrain
- if running on training mode- Returns:
- the result
NDList
-
forward
public static IValue forward(PtSymbolBlock block, IValue... inputs)
Runs the forward of PyTorch module.
-
-