Login using Social Account
     Continue with GoogleLogin using your credentials
First, we will load the original IMDb reviews, as text (byte strings), using TensorFlow Datasets.
import tensorflow_datasets
as tfds
.
import << your code comes here >> as << your code comes here >>
Use load
function of tfds
.
Pass "imdb_reviews"
as argument.
Set as_supervised=True
and with_info=True
.
datasets, info = tfds.<< your code comes here >>("imdb_reviews", as_supervised=True, with_info=True)
Use dataset.keys()
to see the keys of datasets
.
print(datasets.keys())
Let us see the size of the train data and test data.
train_size = info.splits["train"].num_examples
test_size = info.splits["test"].num_examples
print(train_size , test_size)
Taking you to the next exercise in seconds...
Want to create exercises like this yourself? Click here.
Loading comments...