Skip to content

Instantly share code, notes, and snippets.

In the code for "Transformer model for language understanding" , I need to use this code for my own data set. I don't want to install it cause I already have it.
in the following code, the data set is downloaded from Ted Talk. I want to use my own data set instade. How can I use the code to use my own data set instade of this downloaded one?
examples, metadata = tfds.load('ted_hrlr_translate/pt_to_en', with_info=True,
as_supervised=True)
train_examples, val_examples = examples['train'], examples['validation']
The code is in the following URL: https://www.tensorflow.org/tutorials/text/transformer