Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains 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
#https://gist.github.com/stared/dfb4dfaf6d9a8501cd1cc8b8cb806d2e | |
class PlotLosses(keras.callbacks.Callback): | |
def __init__(self,imgs): | |
super(PlotLosses, self).__init__() | |
self.imgs=imgs | |
def on_train_begin(self, logs={}): | |
self.i = 0 | |
self.x = [] |
This file contains 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 collections import Counter, defaultdict | |
import itertools | |
import os | |
import random | |
import re | |
import numpy as np | |
EMBEDDING_FILE = "/u/nlp/data/depparser/nn/data/embeddings/en-cw.txt" | |
EMBEDDING_SERIALIZED = "embeddings.npz" |
NewerOlder