Created
July 24, 2020 06:31
-
-
Save akash-ch2812/0596e461ed0f6fd3201a86453d326a02 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
# compute length of vocabulary and maximum length of a caption (for padding) | |
vocab_len = len(tokenizer.word_counts) + 1 | |
print(f"Vocabulary length - {vocab_len}") | |
max_caption_len = max([len(x.split(" ")) for x in all_captions]) | |
print(f"Maximum length of caption - {max_caption_len}") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment