0

I'm working on federating a UNET semantic segmentation workflow using flower and Pytorch. As of right now I can load the data and run a centralized training but once I try to federate it I see that model parameters are not being loaded properly. I have included a google colab notebook to the code and the log output, to keep the question short.
https://colab.research.google.com/drive/1dmlH4QTX_ZwicbSfwVeCw55BXRnV6PY4?usp=sharing

I'm leaving this up here incase someone is trying to implement a similar workflow. Feel free to reach out.

Greasy Chicken
  • 107
  • 1
  • 9

1 Answers1

0

Silly mistake but I figured out I was trying to call

def set_parameters(device, net, parameters: List[np.ndarray]): 
  params_dict = zip(net.state_dict().keys(), parameters)
  state_dict = OrderedDict({k: torch.Tensor(v) for k, v in params_dict})
  net.load_state_dict(state_dict, strict=True)

which was outside of client class and so I moved it within the class and now the model parameters are being initialized.

Greasy Chicken
  • 107
  • 1
  • 9