Access all weights of a model

Hello @ptrblck , thank you for the answer. I have been trying to use your answer and try to implement something like weight clustering for some model optimization experiments for my project. I have posed a question for the same at Weight clustering question.As this is the most relevant answer that I have found I was wondering if you could confirm if the way that I am trying actually makes sense or is there a better way or an alternate way to achieve the same. It would be great if you could help me out, please.