I am looking for a generic way to construct a block tensor from a specified arrangement of multiple tensors. For example, constructing the tensor
[[A, B], [C, D]] where
D are all tensors. In
np.block( [[A, B], [C, D]]) does the trick. Is there any similar function in
pytorch to achieve the same?
numpy.block: numpy.block - manual