I was rather thinking of returning a collections.namedtuple, since it would allow to keep the current access by index in addition to access by name.
What do you think about the value of adding the feature to PyTorch?