public class PtModel
extends ai.djl.BaseModel
PtModel
is the PyTorch implementation of Model
.
PtModel contains all the methods in Model to load and process a model. In addition, it provides PyTorch Specific functionality
Modifier and Type | Method and Description |
---|---|
java.lang.String[] |
getArtifactNames() |
void |
load(java.nio.file.Path modelPath,
java.lang.String prefix,
java.util.Map<java.lang.String,?> options) |
ai.djl.training.Trainer |
newTrainer(ai.djl.training.TrainingConfig trainingConfig) |
close, describeInput, describeOutput, finalize, getArtifact, getArtifact, getArtifactAsStream, getBlock, getDataType, getModelPath, getName, getNDManager, getProperty, newPredictor, paramPathResolver, readParameters, save, setBlock, setDataType, setModelDir, setProperty
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
java.io.IOException
ai.djl.MalformedModelException
public ai.djl.training.Trainer newTrainer(ai.djl.training.TrainingConfig trainingConfig)
newTrainer
in interface ai.djl.Model
newTrainer
in class ai.djl.BaseModel
public java.lang.String[] getArtifactNames()
getArtifactNames
in interface ai.djl.Model
getArtifactNames
in class ai.djl.BaseModel