Package ai.djl.tensorrt.engine
Class TrtModel
java.lang.Object
ai.djl.BaseModel
ai.djl.tensorrt.engine.TrtModel
- All Implemented Interfaces:
ai.djl.Model
,AutoCloseable
public class TrtModel
extends ai.djl.BaseModel
TrtModel
is the TensorRT implementation of Model
.
OrtModel contains all the methods in Model to load and process a model. In addition, it provides TensorRT Specific functionality
-
Field Summary
Fields inherited from class ai.djl.BaseModel
artifacts, block, dataType, inputData, manager, modelDir, modelName, properties, wasLoaded
-
Method Summary
Methods inherited from class ai.djl.BaseModel
describeInput, describeOutput, finalize, getArtifact, getArtifact, getArtifactAsStream, getArtifactNames, getBlock, getDataType, getModelPath, getName, getNDManager, getProperties, getProperty, load, newTrainer, paramPathResolver, readParameters, readParameters, save, setBlock, setDataType, setModelDir, setProperty, toString
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface ai.djl.Model
cast, getProperty, intProperty, load, load, load, longProperty, newPredictor, quantize
-
Method Details
-
load
- Throws:
IOException
-
newPredictor
public <I,O> ai.djl.inference.Predictor<I,O> newPredictor(ai.djl.translate.Translator<I, O> translator, ai.djl.Device device) - Specified by:
newPredictor
in interfaceai.djl.Model
- Overrides:
newPredictor
in classai.djl.BaseModel
-
close
public void close()- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceai.djl.Model
- Overrides:
close
in classai.djl.BaseModel
-