Package ai.djl.onnxruntime.engine
Class OrtModel
- java.lang.Object
-
- ai.djl.BaseModel
-
- ai.djl.onnxruntime.engine.OrtModel
-
- All Implemented Interfaces:
ai.djl.Model
,java.lang.AutoCloseable
public class OrtModel extends ai.djl.BaseModel
OrtModel
is the ONNX Runtime implementation ofModel
.OrtModel contains all the methods in Model to load and process a model. In addition, it provides ONNX Runtime Specific functionality
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
void
load(java.io.InputStream is, java.util.Map<java.lang.String,?> options)
void
load(java.nio.file.Path modelPath, java.lang.String prefix, java.util.Map<java.lang.String,?> options)
-
Methods inherited from class ai.djl.BaseModel
describeInput, describeOutput, finalize, getArtifact, getArtifact, getArtifactAsStream, getArtifactNames, getBlock, getDataType, getModelPath, getName, getNDManager, getProperty, newPredictor, newTrainer, paramPathResolver, readParameters, save, setBlock, setDataType, setModelDir, setProperty, toString
-
-
-
-
Method Detail
-
load
public void load(java.nio.file.Path modelPath, java.lang.String prefix, java.util.Map<java.lang.String,?> options) throws java.io.IOException, ai.djl.MalformedModelException
- Throws:
java.io.IOException
ai.djl.MalformedModelException
-
load
public void load(java.io.InputStream is, java.util.Map<java.lang.String,?> options) throws java.io.IOException, ai.djl.MalformedModelException
- Specified by:
load
in interfaceai.djl.Model
- Overrides:
load
in classai.djl.BaseModel
- Throws:
java.io.IOException
ai.djl.MalformedModelException
-
close
public void close()
- Specified by:
close
in interfacejava.lang.AutoCloseable
- Specified by:
close
in interfaceai.djl.Model
- Overrides:
close
in classai.djl.BaseModel
-
-