test_fc.py 391 字节
Newer Older
1 2
from paddle.trainer_config_helpers import *

Q
qijun 已提交
3
settings(batch_size=1000, learning_rate=1e-5)
4 5 6 7 8

din = data_layer(name='data', size=100)

trans = trans_layer(input=din)

Q
qijun 已提交
9
hidden = fc_layer(input=trans, size=100, bias_attr=False)
10 11 12

mask = data_layer(name='mask', size=100)

Q
qijun 已提交
13 14
hidden_sel = selective_fc_layer(
    input=din, select=mask, size=100, act=SigmoidActivation())
15 16

outputs(hidden, hidden_sel)