I have a tutorial which shows this in great detail. It doesn’t set the weight to zero and requires grad to False, but shows how to access the parameters. Here’s the github repo for the tutorial - https://github.com/Spandan-Madan/A-Collection-of-important-tasks-in-pytorch 103
In the tutorial go to cell 22 and modify the lines to be.
for child in model.children():
    for param in child.parameters():
        param =  torch.zeros(param.size())
        param.requires_grad = False

This will basically prune all nodes of the model. To specify which nodes are to be pruned just add if statements in the above code to prune only the required nodes!
Hope this helps!