November 2019
Intermediate to advanced
296 pages
7h 52m
English
The IMDb sentiment dataset is the most famous movie review dataset. It contains text that can be used to evaluate movies with a positive/negative sentiment.
We are going to use the preprocessed dataset and the code in tfjs-examples to load the IMDb dataset since it contains several util libraries that we can use to convert the IMDb dataset into a TensorFlow.js-compatible format. Please see the original code to find out how to load the IMDb dataset.
Here, we will load sentences that are a maximum of 100 words in length. The vocabulary size for this dataset is 10,000. This is the same as the sentiment analysis example in tfjs-examples:
const numWords = 10000;const maxLen = 100;const embeddingSize = 8;console.log('Loading ...Read now
Unlock full access