testTrainConfig.py 390 字节
Newer Older
Z
zhangjinchao01 已提交
1 2 3 4 5 6 7 8 9 10 11 12 13 14
from paddle.trainer_config_helpers import *

settings(
    batch_size=100,
    learning_method=AdamOptimizer()
)

din = data_layer(name='input', size=784)

fc1 = fc_layer(name='hidden1', input=din, size=100)
fc2 = fc_layer(name='hidden2', input=fc1, size=100)

opt = fc_layer(input=fc2, size=10, act=SoftmaxActivation())
outputs(classification_cost(input=opt, label=data_layer('lbl', 10)))