Hey,
I figured out a solution. It’s not a perfect one but it works.
Create your blocks:
b_1 = torch.FloatTensor([[1,2],[3,4]])
b_2 = torch.FloatTensor([[5,6],[7,8]])
By concatenating the b_i’s with zeros you to get rows:
r_1 = torch.cat((b_1, torch.zeros((2, 2))), dim = 1)
r_2= torch.cat((torch.zeros((2, 2)), b_2), dim = 1)
And then you concatenate the rows to get c
c = torch.cat((r_1, r_2), dim = 0)
I hope one Max was able to help the other Max