Package ai.djl.python.engine
Class PyModel
- java.lang.Object
-
- ai.djl.BaseModel
-
- ai.djl.python.engine.PyModel
-
- All Implemented Interfaces:
ai.djl.Model
,java.lang.AutoCloseable
public class PyModel extends ai.djl.BaseModel
PyModel
is the Python engine implementation ofModel
.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
load(java.nio.file.Path modelPath, java.lang.String prefix, java.util.Map<java.lang.String,?> options)
<I,O>
ai.djl.inference.Predictor<I,O>newPredictor(ai.djl.translate.Translator<I,O> translator, ai.djl.Device device)
-
Methods inherited from class ai.djl.BaseModel
close, describeInput, describeOutput, finalize, getArtifact, getArtifact, getArtifactAsStream, getArtifactNames, getBlock, getDataType, getModelPath, getName, getNDManager, getProperty, load, 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.FileNotFoundException
- Throws:
java.io.FileNotFoundException
-
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
-
-