예제 #1
0
파일: enwiki.py 프로젝트: lipengyu/cle
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)

h1 = GFLSTM(name='h1',
            parent=['x'],
            parent_dim=[205],
            recurrent=['h2', 'h3'],
            recurrent_dim=[200, 200],
            batch_size=batch_size,
            nout=200,
예제 #2
0
파일: enwiki.py 프로젝트: Beronx86/cle
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],
            recurrent=['h2', 'h3'],
            recurrent_dim=[200, 200],
            nout=200,
            unit='tanh',
            init_W=init_W,
            init_U=init_U,
            init_b=init_b)
예제 #3
0
파일: enwiki.py 프로젝트: vishalbelsare/cle
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],
            recurrent=['h2', 'h3'],
            recurrent_dim=[200, 200],
            nout=200,
            unit='tanh',
            init_W=init_W,
            init_U=init_U,
            init_b=init_b)