Well, I am going to build a CNN including two conv layers. I’m expecting the two layers share one kernel, one of which use the kernel’s transpose.
Here’s what I’ve written:
self.conv2.weight[0,0] = self.conv1.weight[0,0].t()

But I got such error when executing it:
RuntimeError: a leaf Variable that requires grad has been used in an in-place operation.
How should I solve it? Thanks in advance.