Hello,
I would like to set the weights and biases of my pytorch model (which is already trained) randomly within a range. For instance, let the value for of a weight be 12. I’d like it to be set to a random value from a custom range (6-18 for example); and so with every weight/bias. It’s like a naive random search, although I’m just trying to experiment with the model.
One example could be this (in pseudocode):
for weight, bias in model:  // for the entire model
    weight = random(weight/2, weight*2)
    bias = random(bias/2, bias*2)

How can I set those randomly within that custom range and save the new model (as a .pt for instance)?
Thanks,