Hi,
We used to do this in torch7: you had a specific function on the model that was making all the weights a view into a single big buffer. The short version is that this is a nightmare to maintain properly.
Anything you will do that copy a Tensor will break that link and then your optimizer (or penalty function here) will look at different versions of your weights and everything silently break.
In general, doing this for-loop should not be too slow. Is you model very different from general CNN?