Error while converting a RoBERTa TF checkpoint to Pytorch
Author: LeenaShekhar
Pull request: no

## Environment info
<!-- You can run the command `transformers-cli env` and copy-and-paste its output below.
     Don't forget to fill out the missing fields in that output! -->

- `transformers` version: '3.5.1'
- Platform: Linux
- Python version: 3.6.8
- PyTorch version (GPU?): '1.6.0+cu101'
- Tensorflow version (GPU?): '1.14.0'
- Using GPU in script?: No
- Using distributed or parallel set-up in script?: No

### Who can help
<!-- Your issue 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: @Rocketknight1

Library:

- benchmarks: @patrickvonplaten
- deepspeed: @stas00
- ray/raytune: @richardliaw, @amogkam
- text generation: @patrickvonplaten
- tokenizers: @LysandreJik
- trainer: @sgugger
- pipelines: @LysandreJik

Documentation: @sgugger

Model hub:

- for issues with a model report at https://discuss.huggingface.co/ and tag the model's creator.

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

 -->
@LysandreJik, and @patrickvonplaten may be. 

## Information
Model I am using is RoBERTa (finetuned on a custom task). I would like to convert this TF checkpoint to a Pytorch checkpoint that I can further use with the HuggingFace codebase. I tried loading it through with the _from_tf_ flag set but it did not work (shown below). 
## To reproduce

Steps to reproduce the behavior:

```
>>> from transformers import RobertaConfig, RobertaForMaskedLM
>>> config = RobertaConfig.from_pretrained('../roberta_config.json')
>>> model = RobertaForMaskedLM.from_pretrained('../model.ckpt-396000.index', from_tf=True, config=config)

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/leshekha/.local/lib/python3.6/site-packages/transformers/modeling_utils.py", line 966, in from_pretrained
    model = cls.load_tf_weights(model, config, resolved_archive_file[:-6])  # Remove the '.index'
AttributeError: type object 'RobertaForMaskedLM' has no attribute 'load_tf_weights'
```

<!-- If you have code snippets, error messages, stack traces please provide them here as well.
     Important! Use code tags to correctly format your code. See https://help.github.com/en/github/writing-on-github/creating-and-highlighting-code-blocks#syntax-highlighting
     Do not use screenshots, as they are hard to read and (more importantly) don't allow others to copy-and-paste your code.-->

## Expected behavior

<!-- A clear and concise description of what you would expect to happen. -->

I expect to get a model object with the parameters initialized from the checkpoint provided. Just like the provided example in the documents page.

```
from transformers import BertConfig, BertModel
>>> # Loading from a TF checkpoint file instead of a PyTorch model (slower, for example purposes, not runnable).
>>> config = BertConfig.from_json_file('./tf_model/my_tf_model_config.json')
>>> model = BertModel.from_pretrained('./tf_model/my_tf_checkpoint.ckpt.index', from_tf=True, config=config)
```


Comments:
I solved it. Thanks. 

How did you solve it?

Hello, how did you solved your problem?