Fix torch.fx supports (ViT Model)
# What does this PR do?

Fixes #19209


## Before submitting
- [x] This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).
- [x] Did you read the [contributor guideline](https://github.com/huggingface/transformers/blob/main/CONTRIBUTING.md#start-contributing-pull-requests),
      Pull Request section?
- [ ] Was this discussed/approved via a Github issue or the [forum](https://discuss.huggingface.co/)? Please add a link
      to it if that's the case.
- [ ] Did you make sure to update the documentation with your changes? Here are the
      [documentation guidelines](https://github.com/huggingface/transformers/tree/main/docs), and
      [here are tips on formatting docstrings](https://github.com/huggingface/transformers/tree/main/docs#writing-source-documentation).
- [ ] Did you write any new necessary tests?


## Who can review?

Anyone in the community is free to review the PR once the tests have passed. Feel free to tag
members/contributors who may be interested in your PR.

@michaelbenayoun 


## Contents

Originally, torch.fx was not working on vit model
because torch.fx proxy object does not working on if-statement
for example,
```if num_channels != self.num_channels:```
can raise error.

1. I replaced if-statements with torch._assert function.

2. below code should be splitted to two lines.
```
if height != self.image_size[0] or width != self.image_size[1]:
```
because `torch._assert(`statement1` and `statement2`, "error message")` will not work.
so, I wrote as below.

```
err_message = f"Input image size ({height}*{width}) doesn't match model({self.image_size[0]}*{self.image_size[1]})."
torch._assert(height == expected_height, err_message)
torch._assert(width == expected_width, err_message)
```


_The documentation is not available anymore as the PR was closed or merged._<|||||>I replied on the issue thread. It seems like we do not need that.<|||||>Yes, I agree with that
I didn't know that
thank you for your comment

I'll close this PR :)