Package ai.djl.tensorflow.engine
Class TfModel
java.lang.Object
ai.djl.BaseModel
ai.djl.tensorflow.engine.TfModel
- All Implemented Interfaces:
ai.djl.Model,AutoCloseable
public class TfModel
extends ai.djl.BaseModel
TfModel is the TensorFlow implementation of Model.-
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, getBlock, getDataType, getModelPath, getName, getNDManager, getProperties, getProperty, load, loadBlock, newPredictor, newTrainer, paramPathResolver, readParameters, readParameters, setDataType, setModelDir, setProperty, toStringMethods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface ai.djl.Model
cast, getProperty, intProperty, load, load, load, longProperty, newPredictor, quantize
-
Method Details
-
load
public void load(Path modelPath, String prefix, Map<String, ?> options) throws FileNotFoundException, ai.djl.MalformedModelException- Throws:
FileNotFoundExceptionai.djl.MalformedModelException
-
save
- Specified by:
savein interfaceai.djl.Model- Overrides:
savein classai.djl.BaseModel
-
setBlock
public void setBlock(ai.djl.nn.Block block) - Specified by:
setBlockin interfaceai.djl.Model- Overrides:
setBlockin classai.djl.BaseModel
-
getArtifactNames
- Specified by:
getArtifactNamesin interfaceai.djl.Model- Overrides:
getArtifactNamesin classai.djl.BaseModel
-
close
public void close()- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceai.djl.Model- Overrides:
closein classai.djl.BaseModel
-