Skip to content

Instantly share code, notes, and snippets.

@lukereichold
Last active February 18, 2020 00:58
Show Gist options
  • Select an option

  • Save lukereichold/ee829c8a2df11a30870db7d60da00191 to your computer and use it in GitHub Desktop.

Select an option

Save lukereichold/ee829c8a2df11a30870db7d60da00191 to your computer and use it in GitHub Desktop.
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")
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