Commit 6c3b1315 authored by thomwolf's avatar thomwolf
Browse files

typo in readme/doc

parent f83b35b7
...@@ -207,7 +207,7 @@ Let's do a quick example of how a TensorFlow 2.0 model can be trained in 12 line ...@@ -207,7 +207,7 @@ Let's do a quick example of how a TensorFlow 2.0 model can be trained in 12 line
```python ```python
import tensorflow as tf import tensorflow as tf
import tensorflow_datasets import tensorflow_datasets
from pytorch_transformers import * from transformers import *
# Load dataset, tokenizer, model from pretrained model/vocabulary # Load dataset, tokenizer, model from pretrained model/vocabulary
tokenizer = BertTokenizer.from_pretrained('bert-base-cased') tokenizer = BertTokenizer.from_pretrained('bert-base-cased')
...@@ -215,8 +215,8 @@ model = TFBertForSequenceClassification.from_pretrained('bert-base-cased') ...@@ -215,8 +215,8 @@ model = TFBertForSequenceClassification.from_pretrained('bert-base-cased')
data = tensorflow_datasets.load('glue/mrpc') data = tensorflow_datasets.load('glue/mrpc')
# Prepare dataset for GLUE as a tf.data.Dataset instance # Prepare dataset for GLUE as a tf.data.Dataset instance
train_dataset = glue_convert_examples_to_features(data['train'], tokenizer, 128, 'mrpc') train_dataset = glue_convert_examples_to_features(data['train'], tokenizer, max_length=128, task='mrpc')
valid_dataset = glue_convert_examples_to_features(data['validation'], tokenizer, 128, 'mrpc') valid_dataset = glue_convert_examples_to_features(data['validation'], tokenizer, max_length=128, task='mrpc')
train_dataset = train_dataset.shuffle(100).batch(32).repeat(2) train_dataset = train_dataset.shuffle(100).batch(32).repeat(2)
valid_dataset = valid_dataset.batch(64) valid_dataset = valid_dataset.batch(64)
......
...@@ -44,7 +44,7 @@ XLM ...@@ -44,7 +44,7 @@ XLM
``TFXLMModel`` ``TFXLMModel``
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.. autoclass:: pytorch_transformers.TFXLMModel .. autoclass:: transformers.TFXLMModel
:members: :members:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment