Function - model_proto_to_bytes_and_metadata

Function - model_proto_to_bytes_and_metadata#

openfl.protocols.utils.model_proto_to_bytes_and_metadata(model_proto)[source]#

Convert the model protobuf to bytes and metadata.

Parameters:

model_proto – The protobuf of the model.

Returns:

A dictionary where the keys are tensor names and the

values are the corresponding tensor data in bytes.

metadata_dict: A dictionary where the keys are tensor names and the

values are the corresponding tensor metadata.

round_number: The round number for the model.

Return type:

bytes_dict