imdb_review
load_data
¶
Load and return the IMDB Movie review dataset.
This dataset contains 25,000 reviews labeled by sentiments (either positive or negative).
Parameters:
Name | Type | Description | Default |
---|---|---|---|
max_len |
int
|
Maximum desired length of an input sequence. |
required |
vocab_size |
int
|
Vocabulary size to learn word embeddings. |
required |
Returns:
Type | Description |
---|---|
Tuple[NumpyDataset, NumpyDataset]
|
(train_data, eval_data) |
Source code in fastestimator/fastestimator/dataset/data/imdb_review.py
pad
¶
Pad an input_list to a given size.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
input_list |
List[int]
|
The list to be padded. |
required |
padding_size |
int
|
The desired length of the returned list. |
required |
padding_value |
int
|
The value to be inserted for padding. |
required |
Returns:
Type | Description |
---|---|
List[int]
|
|