You can use named_parameters for easier filtering (http://pytorch.org/docs/master/nn.html#containers 529). Why do you think filtering out bias would be too slow? It doesn’t make sense for pytorch to maintain such a collection. So to get such a list, it is very reasonable to sweep over all parameters.