public class PpModel
extends ai.djl.BaseModel
PpModel is the PaddlePaddle implementation of Model.| Modifier and Type | Method and Description |
|---|---|
void |
close() |
void |
load(java.nio.file.Path modelPath,
java.lang.String prefix,
java.util.Map<java.lang.String,?> options)
Loads the PaddlePaddle model from a specified location.
|
<I,O> ai.djl.inference.Predictor<I,O> |
newPredictor(ai.djl.translate.Translator<I,O> translator,
ai.djl.Device device) |
describeInput, describeOutput, finalize, getArtifact, getArtifact, getArtifactAsStream, getArtifactNames, getBlock, getDataType, getModelPath, getName, getNDManager, getProperty, load, newTrainer, paramPathResolver, readParameters, save, setBlock, setDataType, setModelDir, setProperty, toStringpublic void load(java.nio.file.Path modelPath,
java.lang.String prefix,
java.util.Map<java.lang.String,?> options)
throws java.io.IOException
Map<String, String> options = new HashMap<>()
options.put("epoch", "3");
model.load(modelPath, "squeezenet", options);
modelPath - the directory of the modelprefix - the model file name or path prefixoptions - load model options, see documentation for the specific enginejava.io.IOException - Exception for file loadingpublic <I,O> ai.djl.inference.Predictor<I,O> newPredictor(ai.djl.translate.Translator<I,O> translator,
ai.djl.Device device)
newPredictor in interface ai.djl.ModelnewPredictor in class ai.djl.BaseModelpublic void close()
close in interface ai.djl.Modelclose in interface java.lang.AutoCloseableclose in class ai.djl.BaseModel