TypeError: meshgrid() got an unexpected keyword argument 'indexing'
when i tried to run the example given in ViLTModel below. I encountered problem"TypeError: meshgrid() got an unexpected keyword argument 'indexing'"


`from transformers import ViltProcessor, ViltModel
from PIL import Image
import requests

url = "http://images.cocodataset.org/val2017/000000039769.jpg"
image = Image.open(requests.get(url, stream=True).raw)
text = "hello world"

processor = ViltProcessor.from_pretrained("dandelin/vilt-b32-mlm")
model = ViltModel.from_pretrained("dandelin/vilt-b32-mlm")

inputs = processor(image, text, return_tensors="pt")
outputs = model(**inputs)
last_hidden_states = outputs.last_hidden_state`





- `transformers` version: 4.16.2
- Platform: Linux-4.18.0-193.el8.x86_64-x86_64-with-centos-8.2.2004-Core
- Python version: 3.7.11
- PyTorch version (GPU?): 1.9.1+cu111 (True)
- Tensorflow version (GPU?): not installed (NA)
- Flax version (CPU?/GPU?/TPU?): not installed (NA)
- Jax version: not installed
- JaxLib version: not installed
- Using GPU in script?: NA
- Using distributed or parallel set-up in script?: NA






Hi,

You may need to upgrade to PyTorch 1.10 for this to work.<|||||>Sorry i'm new in nlp, I changed the pytorch to 1.10 and it comes another problem.

Some weights of the model checkpoint at dandelin/vilt-b32-mlm were not used when initializing ViltModel: ['mlm_score.transform.LayerNorm.bias', 'mlm_score.transform.dense.weight', 'mlm_score.bias', 'mlm_score.decoder.weight', 'mlm_score.transform.LayerNorm.weight', 'mlm_score.transform.dense.bias']
- This IS expected if you are initializing ViltModel from the checkpoint of a model trained on another task or with another architecture (e.g. initializing a BertForSequenceClassification model from a BertForPreTraining model).
- This IS NOT expected if you are initializing ViltModel from the checkpoint of a model that you expect to be exactly identical (initializing a BertForSequenceClassification model from a BertForSequenceClassification model).<|||||>I have found a solution from the internet, thanks a lot.