Picklize ) from cle.cle.train.opt import Adam from cle.cle.utils import flatten, sharedX, unpack, OrderedDict from cle.datasets.enwiki import EnWiki data_path = '/home/junyoung/data/wikipedia-text/enwiki_char_and_word.npz' save_path = '/home/junyoung/repos/cle/saved/' batch_size = 100 reset_freq = 100 debug = 0 model = Model() trdata = EnWiki(name='train', path=data_path) tedata = EnWiki(name='test', path=data_path) init_W = InitCell('rand') init_U = InitCell('ortho') init_b = InitCell('zeros') x, y = trdata.theano_vars() if debug: x.tag.test_value = np.zeros((10, batch_size, 1), dtype=np.float32) y.tag.test_value = np.zeros((10, batch_size, 1), dtype=np.float32) onehot = OnehotLayer(name='onehot', parent=['x'], nout=205)
Monitoring, Picklize ) from cle.cle.train.opt import Adam from cle.cle.utils import flatten, sharedX, unpack, OrderedDict from cle.datasets.enwiki import EnWiki data_path = '/home/junyoung/data/wikipedia-text/enwiki_char_and_word.npz' save_path = '/home/junyoung/src/cle/saved/' batch_size = 100 reset_freq = 100 debug = 0 model = Model() train_data = EnWiki(name='train', path=data_path) test_data = EnWiki(name='test', path=data_path) init_W = InitCell('rand') init_U = InitCell('ortho') init_b = InitCell('zeros') x, y = train_data.theano_vars() if debug: x.tag.test_value = np.zeros((10, batch_size, 1), dtype=np.float32) y.tag.test_value = np.zeros((10, batch_size, 1), dtype=np.float32) h1 = GFLSTM(name='h1', parent=['x'],
from cle.cle.train import Training from cle.cle.train.ext import (EpochCount, GradientClipping, Monitoring, Picklize) from cle.cle.train.opt import Adam from cle.cle.utils import flatten, sharedX, unpack, OrderedDict from cle.datasets.enwiki import EnWiki data_path = '/home/junyoung/data/wikipedia-text/enwiki_char_and_word.npz' save_path = '/home/junyoung/src/cle/saved/' batch_size = 100 reset_freq = 100 debug = 0 model = Model() train_data = EnWiki(name='train', path=data_path) test_data = EnWiki(name='test', path=data_path) init_W = InitCell('rand') init_U = InitCell('ortho') init_b = InitCell('zeros') x, y = train_data.theano_vars() if debug: x.tag.test_value = np.zeros((10, batch_size, 1), dtype=np.float32) y.tag.test_value = np.zeros((10, batch_size, 1), dtype=np.float32) h1 = GFLSTM(name='h1', parent=['x'], parent_dim=[205],