A pure Python parser for TensorFlow Lite models (*.tflite) that extracts model metadata, operator codes, subgraphs, and tensors without requiring TensorFlow runtime. Current version 2.18.0 corresponds to TensorFlow 2.18.0 schema. Releases follow TensorFlow's major.minor versions, with occasional patches.
pip install tfliteVerified import paths — ran on the pinned version, not inferred.
Parses a TFLite file and prints each operator's name.
Align tflite version with the TensorFlow version used to create the model.
Use 'rb' mode: open(path, 'rb').read()
Use tflite.OperatorCode.BuiltinCode() as documented, but watch for direct attribute access in newer flatbuffers.
Wrap usage in try/except blocks when dealing with untrusted files.