TF version of the trainer
Author: jplu
Pull request: yes

Tensorflow version of the PyTorch Trainer found [here](https://github.com/huggingface/transformers/blob/master/src/transformers/trainer.py). It follow as much as possible the same API, usage and internal method names.

An example can be found [here](https://github.com/jplu/transformers/blob/tf-trainer/examples/ner/run_tf_ner.py). The code contains some hacks mostly for handling datasets see for example the [`TFDataset`](https://github.com/jplu/transformers/blob/tf-trainer/examples/ner/utils_ner.py#L141) that tries to imitate the `Dataset` type from PyTorch.

Comments:
Thanks a lot for these reviews :) I'm currently running the trainer over all the GLUE tasks and few  NER datasets. I still have few bugs solved that will be pushed soon, that will include your reviews.

I do have some logs in Tensorboard yes, I can share them but I suggest you do some test on your side as well to be sure it is ok.

@julien-c As asked here few Tensorboards:

- Sequence Classification example with [GLUE mrpc](https://tensorboard.dev/experiment/xJt1nogwRDO1RkebX6Qspg/#scalars) 
- Regression example with [GLUE sts-b](https://tensorboard.dev/experiment/szdpv9BzTVq8euJKBZpuAQ/#scalars)
- Token Classification example with [Germeval](https://tensorboard.dev/experiment/JMNV2qqbRRamq9EbPLo3Pg/#scalars)

The final commit will arrive during the weekend 😄 

@julien-c I'm now ok with this PR, the trainer has been tested over all the GLUE tasks + Germeval + CoNLL2002 and 2003. There is stil a non blocking minor bug for regression tasks (a raised exception that cannot be catched each time the graph is computed) that I do not really understand, so I will wrap it up into a small piece of code and open an issue in the TF repo. 

Do you want to do a last check?

# [Codecov](https://codecov.io/gh/huggingface/transformers/pull/4017?src=pr&el=h1) Report
> Merging [#4017](https://codecov.io/gh/huggingface/transformers/pull/4017?src=pr&el=desc) into [master](https://codecov.io/gh/huggingface/transformers/commit/1cdd2ad2afb73f6af185aafecb7dd7941a90c4d1&el=desc) will **decrease** coverage by `0.70%`.
> The diff coverage is `34.36%`.

[![Impacted file tree graph](https://codecov.io/gh/huggingface/transformers/pull/4017/graphs/tree.svg?width=650&height=150&src=pr&token=9qOlN6Hb1c)](https://codecov.io/gh/huggingface/transformers/pull/4017?src=pr&el=tree)

```diff
@@            Coverage Diff             @@
##           master    #4017      +/-   ##
==========================================
- Coverage   78.85%   78.15%   -0.71%     
==========================================
  Files         114      117       +3     
  Lines       18688    18938     +250     
==========================================
+ Hits        14737    14801      +64     
- Misses       3951     4137     +186     
```


| [Impacted Files](https://codecov.io/gh/huggingface/transformers/pull/4017?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [src/transformers/trainer\_tf.py](https://codecov.io/gh/huggingface/transformers/pull/4017/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy90cmFpbmVyX3RmLnB5) | `18.26% <18.26%> (ø)` | |
| [src/transformers/training\_args\_tf.py](https://codecov.io/gh/huggingface/transformers/pull/4017/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy90cmFpbmluZ19hcmdzX3RmLnB5) | `58.53% <58.53%> (ø)` | |
| [src/transformers/optimization\_tf.py](https://codecov.io/gh/huggingface/transformers/pull/4017/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9vcHRpbWl6YXRpb25fdGYucHk=) | `79.24% <83.33%> (-0.04%)` | :arrow_down: |
| [src/transformers/\_\_init\_\_.py](https://codecov.io/gh/huggingface/transformers/pull/4017/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9fX2luaXRfXy5weQ==) | `99.08% <100.00%> (+0.02%)` | :arrow_up: |
| [src/transformers/trainer.py](https://codecov.io/gh/huggingface/transformers/pull/4017/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy90cmFpbmVyLnB5) | `41.87% <100.00%> (-2.03%)` | :arrow_down: |
| [src/transformers/trainer\_utils.py](https://codecov.io/gh/huggingface/transformers/pull/4017/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy90cmFpbmVyX3V0aWxzLnB5) | `100.00% <100.00%> (ø)` | |
| [src/transformers/modeling\_tf\_utils.py](https://codecov.io/gh/huggingface/transformers/pull/4017/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9tb2RlbGluZ190Zl91dGlscy5weQ==) | `92.61% <0.00%> (-0.17%)` | :arrow_down: |
| ... and [1 more](https://codecov.io/gh/huggingface/transformers/pull/4017/diff?src=pr&el=tree-more) | |

------

[Continue to review full report at Codecov](https://codecov.io/gh/huggingface/transformers/pull/4017?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/huggingface/transformers/pull/4017?src=pr&el=footer). Last update [1cdd2ad...456a024](https://codecov.io/gh/huggingface/transformers/pull/4017?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).


Awesome work @jplu! 💪💪💪