I am attempting to train a torch model with neuro-evolution. I cannot seem to be able to set weights of a model to a preset tensor. I am able to:
Assign weights based on random values,
             for param in i.model.parameters():
                param.data = torch.rand(param.data.size())

But i cannot seem to do something like set all the models equal to the fittest model:
        for i in self.botList:
            for param in i.model.parameters():
                param.data = self.botList[self.fittest.index].model.parameters():

Where  self.botlist  is my object array of genomes, and  self.botList[self.fittest.index].model.parameters()  loads the fittest model parameters.
Any help would be appreciated, this is my first time using torch. Thanks, Preston
EDIT:
I just tried to save and load the model.state_dict()
    path = "./dict.pt"
    fittest_dict = torch.save(self.botList[self.fittest.index].model.state_dict(),path)
    self.botList[0].model.load_state_dict(fittest_dict)

It creates a dict.pt file, but always produces a  RuntimeError: method 'detach' already has a docstring