Hi,
One way is to “hide” you backbone from the discovery by putting it in a data structure: self.backbone = [my_backbone]. And since .parameters() does not look into arbitrary data structure it won’t be found.
The other way if you don’t want the weights to be parameters anymore is to make sure the weights are not nn.Parameter() anymore. You can do so by:
weight_tensor = self.weight.detach() # .detach() to extract the Tensor out of the nn.Parameter
del self.weight
self.weight = weight_tensor