trainer_config.py 394 字节
Newer Older
Y
Yu Yang 已提交
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
from paddle.trainer_config_helpers import *

img = data_layer(name='pixel', size=784)

hidden = fc_layer(
    input=img,
    size=200,
    param_attr=ParamAttr(name='hidden.w'),
    bias_attr=ParamAttr(name='hidden.b'))

prob = fc_layer(
    input=hidden,
    size=10,
    act=SoftmaxActivation(),
    param_attr=ParamAttr(name='prob.w'),
    bias_attr=ParamAttr(name='prob.b'))

outputs(prob)