import tokenizers
tokenizers.__version__- NLP ๊ด๋ จ ๋ค์ํ ํจํค์ง๋ฅผ ์ ๊ณตํ๊ณ ์์ผ๋ฉฐ, ํนํ ์ธ์ด ๋ชจ๋ธ (language models) ์ ํ์ตํ๊ธฐ ์ํ์ฌ ์ธ ๊ฐ์ง ํจํค์ง๊ฐ ์ ์ฉ
| package | note |
|---|---|
| transformers | Transformer ๊ธฐ๋ฐ (masked) language models ์๊ณ ๋ฆฌ์ฆ, ๊ธฐํ์ต๋ ๋ชจ๋ธ์ ์ ๊ณต |
| tokenizers | transformers ์์ ์ฌ์ฉํ ์ ์๋ ํ ํฌ๋์ด์ ๋ค์ ํ์ต/์ฌ์ฉํ ์ ์๋ ๊ธฐ๋ฅ ์ ๊ณต. transformers ์ ๋ถ๋ฆฌ๋ ํจํค์ง๋ก ์ ๊ณต |
| nlp | ๋ฐ์ดํฐ์ ๋ฐ ํ๊ฐ ์ฒ๋ (evaluation metrics) ์ ์ ๊ณต |
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
| # Working example for my blog post at: | |
| # http://danijar.com/variable-sequence-lengths-in-tensorflow/ | |
| import functools | |
| import sets | |
| import tensorflow as tf | |
| from tensorflow.models.rnn import rnn_cell | |
| from tensorflow.models.rnn import rnn | |
| def lazy_property(function): |
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
| {0: 'tench, Tinca tinca', | |
| 1: 'goldfish, Carassius auratus', | |
| 2: 'great white shark, white shark, man-eater, man-eating shark, Carcharodon carcharias', | |
| 3: 'tiger shark, Galeocerdo cuvieri', | |
| 4: 'hammerhead, hammerhead shark', | |
| 5: 'electric ray, crampfish, numbfish, torpedo', | |
| 6: 'stingray', | |
| 7: 'cock', | |
| 8: 'hen', | |
| 9: 'ostrich, Struthio camelus', |