How to implement two similar network models with untied parameters?

I tried comparing the parameters of the two models with the function described in the following post.

check if models have same weights

And I got the result as “mismatch”. The comparison of the parameters was done after inference and before training. Is this the proper method to check if the parameters are tied or not? Kindly suggest the correct approach for the same.