openfl.protocols.utils.model_proto_to_bytes_and_metadata

openfl.protocols.utils.model_proto_to_bytes_and_metadata(model_proto)

Convert the model protobuf to bytes and metadata.

Parameters:

model_proto – The protobuf of the model.

Returns:
  • bytes_dict – 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.