Support segformer fx
Author: dwlim-nota
Pull request: yes

# What does this PR do?

<!--
Congratulations! You've made it this far! You're not quite done yet though.

Once merged, your PR is going to appear in the release notes with the title you set, so make sure it's a great title that fully reflects the extent of your awesome contribution.

Then, please replace this with a description of the change and which issue is fixed (if applicable). Please also include relevant motivation and context. List any dependencies (if any) that are required for this change.

Once you're done, someone will review your PR shortly (see the section "Who can review?" below to tag some potential reviewers). They may suggest changes to make the code even better. If no one reviewed your PR after a week has passed, don't hesitate to post a new comment @-mentioning the same persons---sometimes notifications get lost.
-->

<!-- Remove if not applicable -->

I wrote simple test code to use fx in the Segformer model.
But failed.

```python
import torch
from transformers import SegformerModel, SegformerConfig, SegformerFeatureExtractor
from transformers.utils.fx import symbolic_trace
from datasets import load_dataset

dataset = load_dataset("huggingface/cats-image")
image = dataset["test"]["image"][0]

feature_extractor = SegformerFeatureExtractor.from_pretrained("nvidia/mit-b0")
model = SegformerModel.from_pretrained("nvidia/mit-b0")

inputs = feature_extractor(image, return_tensors="pt")

traced_model = symbolic_trace(model, ["pixel_values"])

with torch.no_grad():
    outputs = model(**inputs)
    traced_outputs = traced_model(**inputs)

assert torch.allclose(outputs.last_hidden_state, traced_outputs["last_hidden_state"])
```

when I tried to apply fx to Segformer model, HFTracer class could not pass transpose_for_scores function
![image](https://user-images.githubusercontent.com/61265665/198202901-96df6d02-9eaa-4883-9ead-06811a1d3f66.png)

![image](https://user-images.githubusercontent.com/61265665/198202445-4e41a637-ccaa-4443-bbf0-687fc3ae72ac.png)
because Proxy(Torch.Size ) is not iterable object.

so, simply fixed as belows.
![image](https://user-images.githubusercontent.com/61265665/198202946-11dcf6f4-6bb8-4a42-84d3-eb18c1799762.png)

also there was same case in the forward function.
![image](https://user-images.githubusercontent.com/61265665/198203081-1b9d00bc-3115-464b-89c2-d0286edbf4af.png)

to overcome `check_if_model_is_supported`, added segformer to 
![image](https://user-images.githubusercontent.com/61265665/198203886-6ddab9b5-43aa-4fca-adb5-0f6c12fb3d7c.png)

![image](https://user-images.githubusercontent.com/61265665/198203559-b7e1f1d1-a81e-43a8-88af-74af94414bfb.png)


## 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.

<!-- Your PR will be replied to more quickly if you can figure out the right person to tag with @

 If you know how to use git blame, that is the easiest way, otherwise, here is a rough guide of **who to tag**.
 Please tag fewer than 3 people.

Models:

- albert, bert, xlm: @LysandreJik
- blenderbot, bart, marian, pegasus, encoderdecoder,  t5: @patrickvonplaten, @patil-suraj
- longformer, reformer, transfoxl, xlnet: @patrickvonplaten
- fsmt: @stas00
- funnel: @sgugger
- gpt2: @patrickvonplaten, @LysandreJik
- rag: @patrickvonplaten, @lhoestq
- tensorflow: @LysandreJik

Library:

- benchmarks: @patrickvonplaten
- deepspeed: @stas00
- ray/raytune: @richardliaw, @amogkam
- text generation: @patrickvonplaten
- tokenizers: @n1t0, @LysandreJik
- trainer: @sgugger
- pipelines: @LysandreJik

Documentation: @sgugger

HF projects:

- datasets: [different repo](https://github.com/huggingface/datasets)
- rust tokenizers: [different repo](https://github.com/huggingface/tokenizers)

Examples:

- maintained examples (not research project or legacy): @sgugger, @patil-suraj
- research_projects/bert-loses-patience: @JetRunner
- research_projects/distillation: @VictorSanh

 -->

@NielsRogge @michaelbenayoun 

Comments:
I noticed that I previously made commit in the main branch(forked my branch).
so I reopend PR again.
Could you review again ? @michaelbenayoun 

this PR is same with PR 19917(https://github.com/huggingface/transformers/pull/19917)

_The documentation is not available anymore as the PR was closed or merged._