How we can remove this specific inplace operator?

Hello Experienced Ones:
How I can avoid the following inplace operators?

H = torch.zeros(10, 10)
H[:5, :5] = R.t()
H[8:, 8:] = K.t()

where R and K are 5 x 5 and 2 x 2 tensors.

You could use a few torch.cat operations to create the result tensor through a few parts, if you need to avoid inplace ops.