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, getDataType, getModelPath, getName, getProperties, getProperty, load, newPredictor, newTrainer, paramPathResolver, readParameters, setDataType, setModelDir, setProperty, toString
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface ai.djl.Model
cast, getProperty, load, load, load, newPredictor, quantize
-
Method Details
-
load
public void load(Path modelPath, String prefix, Map<String, ?> options) throws FileNotFoundException, ai.djl.MalformedModelException- Throws:
FileNotFoundException
ai.djl.MalformedModelException
-
save
- Specified by:
save
in interfaceai.djl.Model
- Overrides:
save
in classai.djl.BaseModel
-
getBlock
public ai.djl.nn.Block getBlock()- Specified by:
getBlock
in interfaceai.djl.Model
- Overrides:
getBlock
in classai.djl.BaseModel
-
setBlock
public void setBlock(ai.djl.nn.Block block) - Specified by:
setBlock
in interfaceai.djl.Model
- Overrides:
setBlock
in classai.djl.BaseModel
-
getNDManager
public ai.djl.ndarray.NDManager getNDManager()- Specified by:
getNDManager
in interfaceai.djl.Model
- Overrides:
getNDManager
in classai.djl.BaseModel
-
getArtifactNames
- Specified by:
getArtifactNames
in interfaceai.djl.Model
- Overrides:
getArtifactNames
in classai.djl.BaseModel
-
close
public void close()- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceai.djl.Model
- Overrides:
close
in classai.djl.BaseModel
-