Here’s the quant model tensor details:
# Scripts:
print("Checking TFLite model tensor details...")
for detail in interpreter.get_tensor_details():
print(f"Tensor Name: {detail['name']}, Type: {detail['dtype']}")
# OUTPUT:
Checking TFLite model tensor details...
Tensor Name: serving_default_input:0, Type: <class 'numpy.int8'>
Tensor Name: transpose_1/perm, Type: <class 'numpy.int32'>
Tensor Name: transpose_10/perm, Type: <class 'numpy.int32'>
Tensor Name: Const, Type: <class 'numpy.int32'>
Tensor Name: cond/transpose, Type: <class 'numpy.int32'>
Tensor Name: split_14, Type: <class 'numpy.int32'>
Tensor Name: flatten/Reshape/shape, Type: <class 'numpy.int32'>
Tensor Name: convolution, Type: <class 'numpy.int8'>
Tensor Name: Add;convolution;Const_1, Type: <class 'numpy.int32'>
Tensor Name: convolution_1, Type: <class 'numpy.int8'>
Tensor Name: Add_1;convolution;convolution_1;Const_3, Type: <class 'numpy.int32'>
Tensor Name: convolution_2, Type: <class 'numpy.int8'>
Tensor Name: Add_2;convolution_2;Const_5, Type: <class 'numpy.int32'>
Tensor Name: convolution_3, Type: <class 'numpy.int8'>
Tensor Name: Add_3;convolution;convolution_3;Const_7, Type: <class 'numpy.int32'>
Tensor Name: convolution_4, Type: <class 'numpy.int8'>
Tensor Name: Add_4;convolution;convolution_4;Const_9, Type: <class 'numpy.int32'>
Tensor Name: convolution_5, Type: <class 'numpy.int8'>
Tensor Name: Add_5;convolution_2;convolution_5;Const_11, Type: <class 'numpy.int32'>
Tensor Name: convolution_6, Type: <class 'numpy.int8'>
Tensor Name: Add_6;convolution;convolution_6;Const_13, Type: <class 'numpy.int32'>
Tensor Name: convolution_7, Type: <class 'numpy.int8'>
Tensor Name: Add_7;convolution;convolution_7;Const_15, Type: <class 'numpy.int32'>
Tensor Name: convolution_8, Type: <class 'numpy.int8'>
Tensor Name: Add_8;convolution_2;convolution_8;Const_17, Type: <class 'numpy.int32'>
Tensor Name: convolution_9, Type: <class 'numpy.int8'>
Tensor Name: Add_9;convolution;convolution_9;Const_19, Type: <class 'numpy.int32'>
Tensor Name: convolution_10, Type: <class 'numpy.int8'>
Tensor Name: Add_10;convolution_10;Const_21, Type: <class 'numpy.int32'>
Tensor Name: convolution_11, Type: <class 'numpy.int8'>
Tensor Name: Add_11;convolution_10;convolution_11;Const_23, Type: <class 'numpy.int32'>
Tensor Name: convolution_12, Type: <class 'numpy.int8'>
Tensor Name: Add_12;convolution_12;Const_25, Type: <class 'numpy.int32'>
Tensor Name: convolution_13, Type: <class 'numpy.int8'>
Tensor Name: Add_13;convolution_10;convolution_13;Const_27, Type: <class 'numpy.int32'>
Tensor Name: MatMul, Type: <class 'numpy.int8'>
Tensor Name: Const_30, Type: <class 'numpy.int32'>
Tensor Name: transpose_1, Type: <class 'numpy.int8'>
Tensor Name: Add;convolution;Const_11, Type: <class 'numpy.int8'>
Tensor Name: transpose_2, Type: <class 'numpy.int8'>
Tensor Name: Pad, Type: <class 'numpy.int8'>
Tensor Name: transpose_4, Type: <class 'numpy.int8'>
Tensor Name: onnx_tf_prefix_Relu_2;Add_1;convolution;convolution_1;Const_3, Type: <class 'numpy.int8'>
Tensor Name: transpose_5, Type: <class 'numpy.int8'>
Tensor Name: onnx_tf_prefix_Relu_6;Add_2;convolution_2;Const_5, Type: <class 'numpy.int8'>
Tensor Name: Add_3;convolution;convolution_3;Const_71, Type: <class 'numpy.int8'>
Tensor Name: cond/onnx_tf_prefix_Pad_3, Type: <class 'numpy.int8'>
Tensor Name: transpose_6, Type: <class 'numpy.int8'>
Tensor Name: avg_pool, Type: <class 'numpy.int8'>
Tensor Name: onnx_tf_prefix_Add_8, Type: <class 'numpy.int8'>
Tensor Name: transpose_13, Type: <class 'numpy.int8'>
Tensor Name: Pad_1, Type: <class 'numpy.int8'>
Tensor Name: transpose_15, Type: <class 'numpy.int8'>
Tensor Name: onnx_tf_prefix_Relu_10;Add_4;convolution;convolution_4;Const_9, Type: <class 'numpy.int8'>
Tensor Name: transpose_16, Type: <class 'numpy.int8'>
Tensor Name: onnx_tf_prefix_Relu_14;Add_5;convolution_2;convolution_5;Const_11, Type: <class 'numpy.int8'>
Tensor Name: Add_6;convolution;convolution_6;Const_131, Type: <class 'numpy.int8'>
Tensor Name: cond_1/onnx_tf_prefix_Pad_11, Type: <class 'numpy.int8'>
Tensor Name: transpose_17, Type: <class 'numpy.int8'>
Tensor Name: avg_pool_1, Type: <class 'numpy.int8'>
Tensor Name: onnx_tf_prefix_Add_16, Type: <class 'numpy.int8'>
Tensor Name: transpose_24, Type: <class 'numpy.int8'>
Tensor Name: Pad_2, Type: <class 'numpy.int8'>
Tensor Name: transpose_26, Type: <class 'numpy.int8'>
Tensor Name: onnx_tf_prefix_Relu_18;Add_7;convolution;convolution_7;Const_15, Type: <class 'numpy.int8'>
Tensor Name: transpose_27, Type: <class 'numpy.int8'>
Tensor Name: onnx_tf_prefix_Relu_22;Add_8;convolution_2;convolution_8;Const_17, Type: <class 'numpy.int8'>
Tensor Name: Add_9;convolution;convolution_9;Const_191, Type: <class 'numpy.int8'>
Tensor Name: cond_2/onnx_tf_prefix_Pad_19, Type: <class 'numpy.int8'>
Tensor Name: transpose_28, Type: <class 'numpy.int8'>
Tensor Name: avg_pool_2, Type: <class 'numpy.int8'>
Tensor Name: onnx_tf_prefix_Add_24, Type: <class 'numpy.int8'>
Tensor Name: Add_10;convolution_10;Const_211, Type: <class 'numpy.int8'>
Tensor Name: transpose_38, Type: <class 'numpy.int8'>
Tensor Name: Pad_3, Type: <class 'numpy.int8'>
Tensor Name: transpose_40, Type: <class 'numpy.int8'>
Tensor Name: onnx_tf_prefix_Relu_27;Add_11;convolution_10;convolution_11;Const_23, Type: <class 'numpy.int8'>
Tensor Name: transpose_41, Type: <class 'numpy.int8'>
Tensor Name: onnx_tf_prefix_Relu_31;Add_12;convolution_12;Const_25, Type: <class 'numpy.int8'>
Tensor Name: Add_13;convolution_10;convolution_13;Const_271, Type: <class 'numpy.int8'>
Tensor Name: cond_3/onnx_tf_prefix_Pad_28, Type: <class 'numpy.int8'>
Tensor Name: transpose_42, Type: <class 'numpy.int8'>
Tensor Name: avg_pool_3, Type: <class 'numpy.int8'>
Tensor Name: onnx_tf_prefix_Add_33, Type: <class 'numpy.int8'>
Tensor Name: transpose_49, Type: <class 'numpy.int8'>
Tensor Name: Mean, Type: <class 'numpy.int8'>
Tensor Name: flatten/Reshape;onnx_tf_prefix_Reshape_40, Type: <class 'numpy.int8'>
Tensor Name: PartitionedCall:0, Type: <class 'numpy.int8'>
Tensor Name: , Type: <class 'numpy.int32'>
Tensor Name: , Type: <class 'numpy.int32'>
Tensor Name: , Type: <class 'numpy.int32'>
Tensor Name: , Type: <class 'numpy.int8'>
Tensor Name: , Type: <class 'numpy.int8'>
Tensor Name: , Type: <class 'numpy.int8'>
Tensor Name: , Type: <class 'numpy.int8'>
Tensor Name: , Type: <class 'numpy.int8'>
Tensor Name: , Type: <class 'numpy.int8'>