tensorflow/lite/g3doc/api_docs/python/tflite_support/metadata/get_metadata_buffer.md
page_type: reference description: Returns the metadata in the model file as a buffer.
<link rel="stylesheet" href="/site-assets/css/style.css"> <!-- DO NOT EDIT! Automatically generated file. --> <div itemscope itemtype="http://developers.google.com/ReferenceObject"> <meta itemprop="name" content="tflite_support.metadata.get_metadata_buffer" /> <meta itemprop="path" content="Stable" /> </div>View source on GitHub
Returns the metadata in the model file as a buffer.
<pre class="devsite-click-to-copy prettyprint lang-py tfo-signature-link"> <code>tflite_support.metadata.get_metadata_buffer( model_buf ) </code></pre> <!-- Placeholder for "Used in" --> <!-- Tabular view --> <table class="responsive fixed orange"> <colgroup><col width="214px"><col></colgroup> <tr><th colspan="2"><h2 class="add-link">Args</h2></th></tr> <tr> <td> `model_buf`<a id="model_buf"></a> </td> <td> valid buffer of the model file. </td> </tr> </table> <!-- Tabular view --> <table class="responsive fixed orange"> <colgroup><col width="214px"><col></colgroup> <tr><th colspan="2"><h2 class="add-link">Returns</h2></th></tr> <tr class="alt"> <td colspan="2"> Metadata buffer. Returns `None` if the model does not have metadata. </td> </tr> </table>