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 ofPipeline
that has noTransform
defined yet. -
Pipeline
Creates a new instance ofPipeline
that 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
NDList
when thetransform
method is called on this object.- Parameters:
transforms
- the transforms to be applied when thetransform
method is called on this object
-
-
Method Details
-
add
Adds the givenTransform
to the list of transforms to be applied on the input when thetransform
method 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
- theTransform
to be added- Returns:
- this
Pipeline
-
add
-
add
-
insert
Inserts the givenTransform
to 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 inputNDList
when thetransform
method is called on this object.- Parameters:
position
- the position at which theTransform
must be insertedtransform
- theTransform
to be inserted- Returns:
- this
Pipeline
-
insert
-
insert
-
transform
-