I have several models, and I want to aggregate them.
I want to compare two methods, that in one of them, I multiply a coefficient to model parameters, and in another I use torch.mean to aggregate.
I have a problem to get comparable results, and I think it is due the precision of float32 in model parameters.
e.g. if I have ten models, that I want to aggregate their models parameters, I could simply multiply them by 0.1 and then use torch.sum, and I expect to get the same result as torch.mean; yet I am not getting the same results. It is  my simplest scenario, but I have the same problem in more complex operations that I want to compare.
I tried to convert the elements of operations, which are in float32 to float64, and then do the operation and then convert them back to float32, but I get segmentation error.
e.g. (torch.DoubleTensor(a)*torch.DoubleTesnor(b)).float()
Do you have any suggestion?