How To Encode String In Tf.data.dataset?
So I am trying to encode a string in a tensorflow dataset in order to use it to train a pretrained RoBERTa model. The training_dataset is a tensorflow dataset made from a pandas da
Solution 1:
training_dataset
has features and outputs, and in your map
function, you're only using one variable. Try:
training_dataset = training_dataset.map(lambda x, y: (tokenizer.encode(x), y))
Post a Comment for "How To Encode String In Tf.data.dataset?"