How to interpret buffer names in a TFLite model?


How do I interpret the names of the buffers in a TFLite-converted model? For example, what do these two names mean?

  • sequential/resnet50/conv5_block1_3_bn/FusedBatchNormV3;sequential/resnet50/conv5_block1_3_conv/BiasAdd/ReadVariableOp;sequential/resnet50/conv5_block1_3_conv/BiasAdd

  • sequential/resnet50/conv5_block3_2_relu/Relu;sequential/resnet50/conv5_block3_2_bn/FusedBatchNormV3;sequential/resnet50/conv5_block3_2_conv/BiasAdd/ReadVariableOp;sequential/resnet50/conv5_block3_2_conv/BiasAdd;sequential/resnet50/conv5_block3_2_conv/Conv2D


Hi @uint8_t ,

The buffer names provide complete information about the corresponding tensor, such as its function, layer, operation and role in the network’s structure. Usually, buffer names have a hierarchical structure, such as sequential/layer_name/operation_type/suffix.
sequential: denotes a model architecture that is sequential.
layer_name: designates the particular model layer.
operation_type: describes the operation (such as Conv2D, BiasAdd, or Relu) that the buffer performs.
suffix: additional information, such as version numbers or particular operation variants. For example:
sequential/resnet50/conv5_block1_3_bn/FusedBatchNormV3 interpreted as

sequential: This suggests that the buffer is a part of a sequential model, .
resnet50: This designates that the model is a particular architecture, a well-liked pre-trained model for image classification, known as ResNet-50.
conv5_block1_3_bn: This designates the particular architectural layer. In this case, it’s referring to the third block of the fifth convolutional layer’s Batch Normalization layer.
FusedBatchNormV3: This describes the action taken by the buffer; in this instance, it’s a fused Batch Normalization action that combines addition of bias, scaling, and normalization.

Thank You