Transformer "output_hidden_states" format

Hi,
I’m currently using a ViT and I wanted to investigate the hidden states after fine tuning a pre-trained model. I have got hold of the values, thats fine. The problem is I don’t know precisely the format. I’ve been looking through the Docs, and they say this:


Now I cannot find where this “returned tensors” section is. I have checked the docs for other models as all models seem to follow the same implementation, BERT has the same documentation almost exactly with the same problem. The link to the source code is dead, I hunted through the github and find the ViT source code but once again it just says:

Am I being daft or is there a hole in the documentation currently?
Cheers.

Re- the links in the documentation. This is temporary while we are getting 4.17.0 out (the doc is up but the tag is not on GitHub yet, coming in a couple of hours!) If you select another version, the link to the source code will work.

2 Likes

Thanks @sgugger,
I thought it might be something like that: I have found the older source code, however even in this I cannot find the referenced “returned tensors” section in the comments.

This is still a problem with latest docs. See Generation

There are multiple mentions like this, " See scores under returned tensors for more details." but “returned tensors” does not link to anywhere.