Specify parameter sharing pattern in nn.Parameter

Hi Cai!

An entire tensor is a single Parameter. You can’t unregister just some
elements of a tensor.

Your best bet will be to “freeze” the lower triangle at zero by zeroing out
that part of the tensor’s gradient. Here’s a post from @ptrblck that shows
how to do this:

Best.

K. Frank

1 Like