fromValue static method
Implementation
static TensorType fromValue(int tfLiteValue) {
switch (tfLiteValue) {
case TfLiteType.kTfLiteFloat32:
return TensorType.float32;
case TfLiteType.kTfLiteInt32:
return TensorType.int32;
case TfLiteType.kTfLiteUInt8:
return TensorType.uint8;
case TfLiteType.kTfLiteInt64:
return TensorType.int64;
case TfLiteType.kTfLiteString:
return TensorType.string;
case TfLiteType.kTfLiteBool:
return TensorType.boolean;
case TfLiteType.kTfLiteInt16:
return TensorType.int16;
case TfLiteType.kTfLiteComplex64:
return TensorType.complex64;
case TfLiteType.kTfLiteInt8:
return TensorType.int8;
case TfLiteType.kTfLiteFloat16:
return TensorType.float16;
case TfLiteType.kTfLiteFloat64:
return TensorType.float64;
case TfLiteType.kTfLiteComplex128:
return TensorType.complex128;
case TfLiteType.kTfLiteUInt64:
return TensorType.uint64;
case TfLiteType.kTfLiteResource:
return TensorType.resource;
case TfLiteType.kTfLiteVariant:
return TensorType.variant;
case TfLiteType.kTfLiteUInt32:
return TensorType.uint32;
case TfLiteType.kTfLiteUInt16:
return TensorType.uint16;
case TfLiteType.kTfLiteInt4:
return TensorType.int4;
default:
return TensorType.noType;
}
}