There must be many ways but i guess you can use net.state_dict() for it as explained in toy example.
import torch
import torch.nn as nn
import torchvision

net = torchvision.models.resnet18(pretrained=True)

pretrained_dict = net.state_dict()
conv_weights = pretrained_dict['conv1.weight'] #64,3,7,7

new = torch.tensor((), dtype=torch.int32)
new = new.new_ones(conv_weights.shape)

pretrained_dict['conv1.weight'] = new


net.load_state_dict(pretrained_dict)
param = list(net.parameters())

print(param[0])