Package ai.djl.translate
Class Pipeline
java.lang.Object
ai.djl.translate.Pipeline
Pipeline allows applying multiple transforms on an input NDList.-
Constructor Details
-
Pipeline
public Pipeline()Creates a new instance ofPipelinethat has noTransformdefined yet. -
Pipeline
Creates a new instance ofPipelinethat can apply the given transforms on its input.Since no keys are provided for these transforms, they will be applied to the first element in the input
NDListwhen thetransformmethod is called on this object.- Parameters:
transforms- the transforms to be applied when thetransformmethod is called on this object
-
-
Method Details
-
add
Adds the givenTransformto the list of transforms to be applied on the input when thetransformmethod is called on this object.Since no keys are provided for this
Transform, it will be applied to the first element in the inputNDList.- Parameters:
transform- theTransformto be added- Returns:
- this
Pipeline
-
add
-
add
-
insert
Inserts the givenTransformto the list of transforms at the given position.Since no keys or indices are provided for this
Transform, it will be applied to the first element in the inputNDListwhen thetransformmethod is called on this object.- Parameters:
position- the position at which theTransformmust be insertedtransform- theTransformto be inserted- Returns:
- this
Pipeline
-
insert
-
insert
-
transform
-