Builder for
NLClassifier.NLClassifierOptions
.
Builder()
|
abstract NLClassifier.NLClassifierOptions |
build()
|
abstract NLClassifier.NLClassifierOptions.Builder |
setBaseOptions(BaseOptions baseOptions)
Sets the general options to configure Task APIs, such as accelerators.
|
abstract NLClassifier.NLClassifierOptions.Builder |
setInputTensorIndex(int inputTensorIndex)
Set the index of the input text tensor among all input tensors, if the model
has multiple inputs.
|
abstract NLClassifier.NLClassifierOptions.Builder |
setInputTensorName(String
inputTensorName)
Set the name of the input text tensor, if the model has multiple inputs.
|
abstract NLClassifier.NLClassifierOptions.Builder |
setOutputLabelTensorIndex(int outputLabelTensorIndex)
Set the index of the optional output label tensor among all output tensors, if
the model has multiple outputs.
|
abstract NLClassifier.NLClassifierOptions.Builder |
setOutputLabelTensorName(String
outputLabelTensorName)
Set the name of the output label tensor, if the model has multiple outputs.
|
abstract NLClassifier.NLClassifierOptions.Builder |
setOutputScoreTensorIndex(int outputScoreTensorIndex)
Set the index of the output score tensor among all output tensors, if the model
has multiple outputs.
|
abstract NLClassifier.NLClassifierOptions.Builder |
setOutputScoreTensorName(String
outputScoreTensorName)
Set the name of the output score tensor, if the model has multiple outputs.
|
Sets the general options to configure Task APIs, such as accelerators.
Set the index of the input text tensor among all input tensors, if the model has multiple inputs. Only the input tensor specified will be used for inference; other input tensors will be ignored. Dafualt to 0.
See the section, Configure the input/output tensors for NLClassifier, for more details.
Set the name of the input text tensor, if the model has multiple inputs. Only the
input tensor specified will be used for inference; other input tensors will be ignored.
Dafualt to "INPUT"
.
See the section, Configure the input/output tensors for NLClassifier, for more details.
Set the index of the optional output label tensor among all output tensors, if the model has multiple outputs.
See the document above outputLabelTensorName
for more information about
what the output label tensor is.
See the section, Configure the input/output tensors for NLClassifier, for more details.
outputLabelTensorIndex
dafualts to -1, meaning to disable the output
label tensor.
Set the name of the output label tensor, if the model has multiple outputs. Dafualt
to "OUTPUT_LABEL"
.
See the section, Configure the input/output tensors for NLClassifier, for more details.
By default, label file should be packed with the output score tensor through Model Metadata. See the MetadataWriter for NLClassifier. NLClassifier reads and parses labels from the label file automatically. However, some models may output a specific label tensor instead. In this case, NLClassifier reads labels from the output label tensor.
Set the index of the output score tensor among all output tensors, if the model has multiple outputs. Dafualt to 0.
See the section, Configure the input/output tensors for NLClassifier, for more details.
Set the name of the output score tensor, if the model has multiple outputs. Dafualt
to "OUTPUT_SCORE"
.
See the section, Configure the input/output tensors for NLClassifier, for more details.