I am using the Transformer code from tensorflow - https://www.tensorflow.org/beta/tutorials/text/transformer
In this code, the dataset used is loaded like this -
examples, metadata = tfds.load('ted_hrlr_translate/pt_to_en', with_info=True,
as_supervised=True)
train_examples, val_examples = examples['train'], examples['validation']
When I check the type of train_examples using :
type(train_examples)
I get the following as output -
tensorflow.python.data.ops.dataset_ops._OptionsDataset
Now I just wanted to change some entries of the dataset that is the sentences, but I am not able to as I don't understand the type.
I am able to iterate over it using :
for data in train_examples:
print(data,type(data))
And type of data is -
<class 'tuple'>
Finally what I want is to replace some of these tuples with my own data.
Can someone tell me how to do this or give me some details about this type
tensorflow.python.data.ops.dataset_ops._OptionsDataset
.