parameters: (model_object)
return_statement: return model_bytearray
docstring: Converts a tflite model from an object to a immutable bytearray.
docstring_summary: Converts a tflite model from an object to a immutable bytearray.
docstring_tokens: Converts a tflite model from an object to a immutable bytearray .
function: def convert_object_to_bytearray(model_object):
    """Converts a tflite model from an object to a immutable bytearray."""
    # Initial size of the buffer, which will grow automatically if needed
    builder = flatbuffers.Builder(1024)
    model_offset = model_object.Pack(builder)
    builder.Finish(model_offset, file_identifier=_TFLITE_FILE_IDENTIFIER)
    model_bytearray = bytes(builder.Output())
    return model_bytearray
function_tokens: def convert_object_to_bytearray ( model_object ) : # Initial size of the buffer, which will grow automatically if needed builder = flatbuffers . Builder ( 1024 ) model_offset = model_object . Pack ( builder ) builder . Finish ( model_offset , file_identifier = _TFLITE_FILE_IDENTIFIER ) model_bytearray = bytes ( builder . Output ( ) ) return model_bytearray