Hi, I obtained my model’s parameters with
old_params = {}
for name, params in model.named_parameters():
old_params[name] = params.clone()
Then I played with weights and biases ended with downsized network. Since the sizes of layers are changed I can’t reassign weight to model.named_parameters.
for name, params in model.named_parameters():
params.data.copy_(old_params[name])
However, I need to because I am gong to compare runtimes of forward functions. In other words, I want to compare apple to apple. Any idea how to handle it would be nice.