Created
February 25, 2019 21:55
-
-
Save rsepassi/d6d224a25529e01b52c66c030c28cd12 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# See the built-in configs | |
configs = tfds.text.IMDBReviews.builder_configs | |
assert "bytes" in configs | |
# Address a built-in config with tfds.builder | |
imdb = tfds.builder("imdb_reviews/bytes") | |
# or when constructing the builder directly | |
imdb = tfds.text.IMDBReviews(config="bytes") | |
# or use your own custom configuration | |
my_encoder = tfds.features.text.ByteTextEncoder(additional_tokens=['hello']) | |
my_config = tfds.text.IMDBReviewsConfig( | |
name="my_config", | |
version="1.0.0", | |
text_encoder_config=tfds.features.text.TextEncoderConfig(encoder=my_encoder), | |
) | |
imdb = tfds.text.IMDBReviews(config=my_config) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment