Modifier and Type | Method and Description |
---|---|
Criteria<I,O> |
build()
Builds a
Criteria instance. |
Criteria.Builder<I,O> |
optApplication(Application application)
Sets the model application for this criteria.
|
Criteria.Builder<I,O> |
optArgument(java.lang.String key,
java.lang.Object value)
Sets the optional model loading argument for this criteria.
|
Criteria.Builder<I,O> |
optArguments(java.util.Map<java.lang.String,java.lang.Object> arguments)
Sets an extra model loading argument for this criteria.
|
Criteria.Builder<I,O> |
optArtifactId(java.lang.String artifactId)
Sets optional artifactId of the
ModelLoader for this criteria. |
Criteria.Builder<I,O> |
optBlock(Block block)
Sets an optional model
Block for this criteria. |
Criteria.Builder<I,O> |
optDevice(Device device)
Sets the
Device for this criteria. |
Criteria.Builder<I,O> |
optEngine(java.lang.String engine)
Sets the engine name for this criteria.
|
Criteria.Builder<I,O> |
optFilter(java.lang.String key,
java.lang.String value)
Sets an extra search filter for this criteria.
|
Criteria.Builder<I,O> |
optFilters(java.util.Map<java.lang.String,java.lang.String> filters)
Sets the extra search filters for this criteria.
|
Criteria.Builder<I,O> |
optGroupId(java.lang.String groupId)
Sets optional groupId of the
ModelZoo for this criteria. |
Criteria.Builder<I,O> |
optModelName(java.lang.String modelName)
Sets an optional model name for this criteria.
|
Criteria.Builder<I,O> |
optModelPath(java.nio.file.Path modelPath)
Sets the optional model path of the
ModelLoader for this criteria. |
Criteria.Builder<I,O> |
optModelUrls(java.lang.String modelUrls)
Sets optional model urls of the
ModelLoader for this criteria. |
Criteria.Builder<I,O> |
optModelZoo(ModelZoo modelZoo)
Sets optional
ModelZoo of the ModelLoader for this criteria. |
Criteria.Builder<I,O> |
optOption(java.lang.String key,
java.lang.String value)
Sets the optional model loading option for this criteria.
|
Criteria.Builder<I,O> |
optOptions(java.util.Map<java.lang.String,java.lang.String> options)
Sets the model loading options for this criteria.
|
Criteria.Builder<I,O> |
optProgress(ai.djl.util.Progress progress)
Set the optional
Progress . |
Criteria.Builder<I,O> |
optTranslator(Translator<I,O> translator)
Sets the optional
Translator to override default Translator . |
Criteria.Builder<I,O> |
optTranslatorFactory(TranslatorFactory<I,O> factory)
Sets the optional
TranslatorFactory to override default Translator . |
<P,Q> Criteria.Builder<P,Q> |
setTypes(java.lang.Class<P> inputClass,
java.lang.Class<Q> outputClass)
Creates a new @{code Builder} class with the specified input and output data type.
|
public <P,Q> Criteria.Builder<P,Q> setTypes(java.lang.Class<P> inputClass, java.lang.Class<Q> outputClass)
P
- the input data typeQ
- the output data typeinputClass
- the input classoutputClass
- the output classpublic Criteria.Builder<I,O> optApplication(Application application)
application
- the model applicationBuilder
public Criteria.Builder<I,O> optEngine(java.lang.String engine)
engine
- the engine nameBuilder
public Criteria.Builder<I,O> optDevice(Device device)
Device
for this criteria.device
- the Device
for the criteriaBuilder
public Criteria.Builder<I,O> optGroupId(java.lang.String groupId)
ModelZoo
for this criteria.groupId
- the groupId of the ModelZoo
Builder
public Criteria.Builder<I,O> optArtifactId(java.lang.String artifactId)
ModelLoader
for this criteria.artifactId
- the artifactId of the ModelLoader
Builder
public Criteria.Builder<I,O> optModelUrls(java.lang.String modelUrls)
ModelLoader
for this criteria.modelUrls
- the comma delimited url stringBuilder
public Criteria.Builder<I,O> optModelPath(java.nio.file.Path modelPath) throws java.net.MalformedURLException
ModelLoader
for this criteria.modelPath
- the path to the model folder/filesBuilder
java.net.MalformedURLException
- wrong path formatpublic Criteria.Builder<I,O> optModelZoo(ModelZoo modelZoo)
ModelZoo
of the ModelLoader
for this criteria.modelZoo
- ModelZoo} of the ModelLoader
for this criteriaBuilder
public Criteria.Builder<I,O> optFilters(java.util.Map<java.lang.String,java.lang.String> filters)
filters
- the extra search filtersBuilder
public Criteria.Builder<I,O> optFilter(java.lang.String key, java.lang.String value)
key
- the search keyvalue
- the search valueBuilder
public Criteria.Builder<I,O> optBlock(Block block)
Block
for this criteria.block
- optional model Block
for this criteriaBuilder
public Criteria.Builder<I,O> optModelName(java.lang.String modelName)
modelName
- optional model name for this criteriaBuilder
public Criteria.Builder<I,O> optArguments(java.util.Map<java.lang.String,java.lang.Object> arguments)
arguments
- optional model loading argumentsBuilder
public Criteria.Builder<I,O> optArgument(java.lang.String key, java.lang.Object value)
key
- the model loading argument keyvalue
- the model loading argument valueBuilder
public Criteria.Builder<I,O> optOptions(java.util.Map<java.lang.String,java.lang.String> options)
options
- the model loading optionsBuilder
public Criteria.Builder<I,O> optOption(java.lang.String key, java.lang.String value)
key
- the model loading option keyvalue
- the model loading option valueBuilder
public Criteria.Builder<I,O> optTranslator(Translator<I,O> translator)
Translator
to override default Translator
.translator
- the override Translator
Builder
public Criteria.Builder<I,O> optTranslatorFactory(TranslatorFactory<I,O> factory)
TranslatorFactory
to override default Translator
.factory
- the override TranslatorFactory
Builder
public Criteria.Builder<I,O> optProgress(ai.djl.util.Progress progress)
Progress
.progress
- the Progress
Builder