Function - get_model

Contents

Function - get_model#

openfl.interface.model.get_model(plan_config, cols_config, data_config, model_protobuf_path, input_shape)[source]#

Initialize TaskRunner and load it with provided model.pbuf.

Contrary to its name, this function returns a TaskRunner instance. The reason for this behavior is the flexibility of the TaskRunner interface and the diversity of the ways we store models in our template workspaces.

Parameters:
  • plan_config (str) – Federated learning plan.

  • cols_config (str) – Authorized collaborator list.

  • data_config (str) – The data set/shard configuration file.

  • model_protobuf_path (str) – The model protobuf to convert.

  • input_shape (list | dict ?) – input_shape denoted by list notation [a,b,c, …] or in case of multihead models, dict object with individual layer keys such as {“input_0”: [a,b,…], “output_1”: [x,y,z, …]} Defaults to None.

Returns:

TaskRunner instance.

Return type:

task_runner (instance)