File size: 354 Bytes
5fa1a76 |
1 2 3 4 5 6 7 8 |
The following example shows how to get the last hidden state using [VisualBertModel]: thon import torch from transformers import BertTokenizer, VisualBertModel model = VisualBertModel.from_pretrained("uclanlp/visualbert-vqa-coco-pre") tokenizer = BertTokenizer.from_pretrained("google-bert/bert-base-uncased") inputs = tokenizer("What is the man eating? |