I am trying to extract all the weights, but not biases, from a network. I realise I could just use model.parameters() and then filter out the biases, but this would likely be too slow. Additionally, using layer.weight would not work as I need it to be as “universal” as possible so I don’t have to change the code every time I modify the network. Is there any other way of doing this?