Thanks for the code!
It should work, as shown with this dummy code snippet:
model = models.resnet50()

for m in model.modules():
    if isinstance(m, nn.Conv2d):
        print('m.weight.shape',m.weight.shape,',dimension = ',m.weight.ndimension())
        torch.nn.init.orthogonal_(m.weight)

Minor issue: you should get a UserWarning:
UserWarning: nn.init.orthogonal is now deprecated in favor of nn.init.orthogonal_.

which shouldn’t be related to the error you are seeing.