AttributeError: EagerTensor object has no attribute 'size'
### System Info

```
- `transformers` version: 4.29.2
- Platform: macOS-13.4-x86_64-i386-64bit
- Python version: 3.10.2
- Huggingface_hub version: 0.14.1
- Safetensors version: not installed
- PyTorch version (GPU?): 2.0.1 (False)
- Tensorflow version (GPU?): 2.12.0 (False)
- Flax version (CPU?/GPU?/TPU?): not installed (NA)
- Jax version: not installed
- JaxLib version: not installed
- Using GPU in script?: no
- Using distributed or parallel set-up in script?: no
```

### Who can help?

_No response_

### Information

- [X] The official example scripts
- [ ] My own modified scripts

### Tasks

- [ ] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)
- [ ] My own task or dataset (give details below)

### Reproduction

run the code [at](https://huggingface.co/docs/transformers/main/en/model_doc/tapas#transformers.TFTapasForQuestionAnswering):

```
from transformers import AutoTokenizer, TapasForQuestionAnswering
import pandas as pd

tokenizer = AutoTokenizer.from_pretrained("google/tapas-base-finetuned-wtq")
model = TapasForQuestionAnswering.from_pretrained("google/tapas-base-finetuned-wtq")

data = {
    "Actors": ["Brad Pitt", "Leonardo Di Caprio", "George Clooney"],
    "Age": ["56", "45", "59"],
    "Number of movies": ["87", "53", "69"],
}
table = pd.DataFrame.from_dict(data)
queries = ["How many movies has George Clooney played in?", "How old is Brad Pitt?"]

inputs = tokenizer(table=table, queries=queries, padding="max_length", return_tensors="tf")
outputs = model(**inputs)

logits = outputs.logits
logits_aggregation = outputs.logits_aggregation
```

# Observed Result

```
% python sample2.py
2023-05-27 16:48:53.829758: I tensorflow/core/platform/cpu_feature_guard.cc:182] This TensorFlow binary is optimized to use available CPU instructions in performance-critical operations.
To enable the following instructions: AVX2 FMA, in other operations, rebuild TensorFlow with the appropriate compiler flags.
Traceback (most recent call last):
  File "/llm/tapas-poc/sample2.py", line 16, in <module>
    outputs = model(**inputs)
  File "/llm/tapas-poc/.env/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1501, in _call_impl
    return forward_call(*args, **kwargs)
  File "/llm/tapas-poc/.env/lib/python3.10/site-packages/transformers/models/tapas/modeling_tapas.py", line 1217, in forward
    outputs = self.tapas(
  File "/llm/tapas-poc/.env/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1501, in _call_impl
    return forward_call(*args, **kwargs)
  File "/llm/tapas-poc/.env/lib/python3.10/site-packages/transformers/models/tapas/modeling_tapas.py", line 928, in forward
    input_shape = input_ids.size()
  File "/llm/tapas-poc/.env/lib/python3.10/site-packages/tensorflow/python/framework/ops.py", line 437, in __getattr__
    raise AttributeError(
AttributeError: EagerTensor object has no attribute 'size'.
        If you are looking for numpy-related methods, please run the following:
        from tensorflow.python.ops.numpy_ops import np_config
        np_config.enable_numpy_behavior()
```

### Expected behavior

there should be no error
You are using TensorFlow inputs with a PyTorch model, this cannot work.<|||||>This issue has been automatically marked as stale because it has not had recent activity. If you think this still needs to be addressed please comment on this thread.

Please note that issues that do not follow the [contributing guidelines](https://github.com/huggingface/transformers/blob/main/CONTRIBUTING.md) are likely to be ignored.