You can check the source here 47 but it basically does inp = inp.view(inp.size(0), -1) And then optionally transpose to make sure to be able to find an orthogonal matrix.
If you want many 2x2 orthogonal matrices, you might have to call orthogonal_ multiple times.