Hey,
I am wondering what the fastest way to create a block-diagonal matrix would be using PyTorch?
As an example, given
a = torch.FloatTensor([[1,2],[3,4]])
b = torch.FloatTensor([[5,6],[7,8]])

I would like to create
c = torch.FloatTensor([[1,2,0,0],[3,4,0,0],[0,0,5,6],[0,0,7,8]])
Any help much appreciated.
Many thanks,
Max