OperandCode

Operand types.

The type of operands that can be added to a model.

Although we define many types, most operators accept just a few types. Most used are {@link ANEURALNETWORKS_TENSOR_FLOAT32}, {@link ANEURALNETWORKS_TENSOR_QUANT8_ASYMM}, and {@link ANEURALNETWORKS_INT32}.

Available since API level 27.

Values

ValueMeaning
ANEURALNETWORKS_FLOAT320

A 32 bit floating point scalar value.

ANEURALNETWORKS_INT321

A signed 32 bit integer scalar value.

ANEURALNETWORKS_UINT322

An unsigned 32 bit integer scalar value.

ANEURALNETWORKS_TENSOR_FLOAT323

A tensor of 32 bit floating point values.

ANEURALNETWORKS_TENSOR_INT324

A tensor of 32 bit integer values.

ANEURALNETWORKS_TENSOR_QUANT8_ASYMM5

A tensor of 8 bit integers that represent real numbers.

Attached to this tensor are two numbers that can be used to convert the 8 bit integer to the real value and vice versa. These two numbers are: - scale: a 32 bit floating point value greater than zero. - zeroPoint: a 32 bit integer, in range [0, 255].

The formula is: real_value = (integer_value - zeroPoint) * scale.

Meta