예제 #1
0
def model(th):
    assert isinstance(th, m.Config)
    cell = RHN(
        state_size=th.state_size,
        num_layers=th.num_layers,
        hyper_kernel=th.hyper_kernel,
        forget_bias=th.forget_bias_initializer,
    )
    return m.typical(th, cell)
예제 #2
0
def model(th):
    assert isinstance(th, m.Config)
    cell = FastSlow(
        fast_size=th.fast_size,
        fast_layers=th.fast_layers,
        slow_size=th.slow_size,
        hyper_kernel=th.hyper_kernel,
        forget_bias=th.forget_bias_initializer,
    )
    return m.typical(th, cell)
예제 #3
0
def model(th):
    assert isinstance(th, core.Config)
    cell = GamRHN(
        gam_config=th.gam_config,
        head_size=th.head_size,
        state_size=th.state_size,
        num_layers=th.num_layers,
        kernel=th.hyper_kernel,
    )
    return m.typical(th, cell)
예제 #4
0
def model(th):
    assert isinstance(th, m.Config)
    cell = BasicLSTMCell(state_size=th.state_size,
                         forget_bias_initializer=th.forget_bias_initializer)
    return m.typical(th, cell)
예제 #5
0
def model(th):
    assert isinstance(th, m.Config)
    cell = GRU(state_size=th.state_size)
    return m.typical(th, cell)
예제 #6
0
def model(th):
    assert isinstance(th, m.Config)
    cell = GDU(configs=th.gdu_string)
    return m.typical(th, cell)