NLClassifierOptions class

Options to identify input and output tensors of the model.

Configure the input/output tensors for NLClassifier:

- No special configuration is needed if the model has only one input tensor and one output tensor.

- When the model has multiple input or output tensors, use the following configurations to specifiy the desired tensors:
-- tensor names: {inputTensorName}, {outputScoreTensorName}, {@code outputLabelTensorName}
-- tensor indices: {inputTensorIndex}, {outputScoreTensorIndex}, {@code outputLabelTensorIndex}
Tensor names has higher priorities than tensor indices in locating the tensors. It means the tensors will be first located according to tensor names. If not found, then the tensors will be located according to tensor indices.

- Failing to match the input text tensor or output score tensor with neither tensor names nor tensor indices will trigger a runtime error. However, failing to locate the output label tensor will not trigger an error because the label tensor is optional.

Constructors

NLClassifierOptions()
Creates a new options instance.
factory

Properties

base Pointer<TfLiteNLClassifierOptions>
no setter
hashCode int
The hash code for this object.
no setterinherited
inputTensorIndex int
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.
getter/setter pair
inputTensorName String
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".
getter/setter pair
outputLabelTensorIndex int
Set the index of the optional output label tensor among all output tensors, if the model has multiple outputs.
getter/setter pair
outputLabelTensorName String
Set the name of the output label tensor, if the model has multiple outputs. Dafualt to "OUTPUT_LABEL".
getter/setter pair
outputScoreTensorIndex int
Set the index of the output score tensor among all output tensors, if the model has multiple outputs. Dafualt to 0.
getter/setter pair
outputScoreTensorName String
Set the name of the output score tensor, if the model has multiple outputs. Dafualt to "OUTPUT_SCORE".
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

delete() → void
Destroys the options instance.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited