Last active
February 18, 2020 00:58
-
-
Save lukereichold/ee829c8a2df11a30870db7d60da00191 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
| from deepmoji.model_def import deepmoji_emojis | |
| from deepmoji.global_variables import PRETRAINED_PATH | |
| model = deepmoji_emojis(30, PRETRAINED_PATH) | |
| model.save("deepmoji_model.h5") |
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
| import coremltools | |
| from deepmoji.model_def import deepmoji_emojis | |
| from deepmoji.global_variables import PRETRAINED_PATH | |
| MAX_LEN = 30 # max number of words to process | |
| model = deepmoji_emojis(MAX_LEN, PRETRAINED_PATH) | |
| mlmodel = coremltools.converters.keras.convert(model, | |
| input_names='word_embeddings', | |
| output_names='emoji_label_probabilities', | |
| class_labels='./data/filtering/wanted_emojis.csv') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment