Thanks for the code.
self.rec = torch.nn.Parameter(torch.from_numpy(init)) is creating a tensor, which is not contiguous due to the moveaxis operation on the numpy array.
Use:
self.rec = torch.nn.Parameter(torch.from_numpy(init).contiguous())

and the code should work.
You can add code snippets by wrapping them into three backticks ```. I’ve formatted your code for you.