If you want to operate directly on the tensors containing the parameters, you can access them using f.weight.data and f.bias.data.
I am not sure what is your context, but maybe state_dict() and load_state_dict() are the recommended methods to save and load values for some model’s parameters.