In that case masking should work:
model = models.resnet18()
sd = model.state_dict()

for key in sd:
    print(key)
    print('abs.sum before {}'.format(sd[key].abs().sum()))
    mask = torch.empty_like(sd[key])
    mask.random_(0, 2)
    print('mask, 0s: {}, nelement: {}'.format(mask.sum(), mask.nelement()))
    sd[key].mul_(mask)
    print('abs.sum after {}'.format(sd[key].abs().sum()))